Commit 357f584d by fudahua

Merge remote-tracking branch 'origin/developer' into developer

parents a8303c94 b85eeabf
......@@ -46,10 +46,19 @@ public class AuditDTO implements Serializable {
private String wxEnterpriseId;
private String relatedId;
private static final long serialVersionUID = 1L;
public String getWxEnterpriseId() {
public String getRelatedId() {
return relatedId;
}
public void setRelatedId(String relatedId) {
this.relatedId = relatedId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
......
......@@ -42,9 +42,19 @@ public class TabHaobanAudit implements Serializable {
private String wxEnterpriseId;
private String relatedId;
private static final long serialVersionUID = 1L;
public String getAuditId() {
public String getRelatedId() {
return relatedId;
}
public void setRelatedId(String relatedId) {
this.relatedId = relatedId;
}
public String getAuditId() {
return auditId;
}
......
......@@ -21,11 +21,12 @@
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
<result column="status_flag" property="statusFlag" jdbcType="INTEGER" />
<result column="wx_enterprise_id" property="wxEnterpriseId" jdbcType="VARCHAR" />
<result column="related_id" property="relatedId" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
audit_id, audit_type, commit_name, commit_staff_id, commit_staff_name, commit_staff_img,
commit_store_id, change_field, old_value, new_value, commit_time, enterprise_id,
audit_name, audit_status, audit_reason, create_time, update_time, status_flag, wx_enterprise_id
audit_name, audit_status, audit_reason, create_time, update_time, status_flag, wx_enterprise_id,related_id
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
......@@ -44,14 +45,14 @@
new_value, commit_time, enterprise_id,
audit_name, audit_status, audit_reason,
create_time, update_time, status_flag,
wx_enterprise_id)
wx_enterprise_id,related_id)
values (#{auditId,jdbcType=VARCHAR}, #{auditType,jdbcType=INTEGER}, #{commitName,jdbcType=VARCHAR},
#{commitStaffId,jdbcType=VARCHAR}, #{commitStaffName,jdbcType=VARCHAR}, #{commitStaffImg,jdbcType=VARCHAR},
#{commitStoreId,jdbcType=VARCHAR}, #{changeField,jdbcType=VARCHAR}, #{oldValue,jdbcType=VARCHAR},
#{newValue,jdbcType=VARCHAR}, #{commitTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=VARCHAR},
#{auditName,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER}, #{auditReason,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{statusFlag,jdbcType=INTEGER},
#{wxEnterpriseId,jdbcType=VARCHAR})
#{wxEnterpriseId,jdbcType=VARCHAR},#{relatedId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanAudit" >
insert into tab_haoban_audit
......@@ -113,6 +114,9 @@
<if test="wxEnterpriseId != null" >
wx_enterprise_id,
</if>
<if test="relatedId != null" >
related_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="auditId != null" >
......@@ -172,6 +176,9 @@
<if test="wxEnterpriseId != null" >
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="relatedId != null" >
#{relatedId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanAudit" >
......@@ -231,6 +238,9 @@
<if test="wxEnterpriseId != null" >
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="relatedId != null" >
related_id = #{relatedId,jdbcType=VARCHAR},
</if>
</set>
where audit_id = #{auditId,jdbcType=VARCHAR}
</update>
......@@ -253,7 +263,8 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status_flag = #{statusFlag,jdbcType=INTEGER},
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
related_id = #{relatedId,jdbcType=VARCHAR}
where audit_id = #{auditId,jdbcType=VARCHAR}
</update>
<sql id="storeSql">
......@@ -379,15 +390,17 @@
<include refid="Base_Column_List" />
from tab_haoban_audit
where 1=1
and store_id = #{storeId,jdbcType=VARCHAR}
and commit_store_id = #{storeId,jdbcType=VARCHAR}
and status_flag = 1
<if test="auditType == null || auditType == -1">
and audit_type in (2,3,4,5)
and audit_type in (2,3,4,5)
</if>
<if test="auditType != null and auditType != -1">
and audit_type = #{auditType}
and audit_type = #{auditType}
</if>
<if test="auditStatus != null and auditStatus != -1">
and audit_status = #{auditStatus}
</if>
and audit_status = #{auditStatus}
order by create_time desc
</select>
......
......@@ -555,6 +555,32 @@ public class ClerkController extends WebBaseController{
staffClerkRelation.setWxUserId(wxUserId);
staffClerkRelation.setStaffId(staffId);
staffClerkRelationApiService.insert(staffClerkRelation);
//无需审核
AuditDTO audit = new AuditDTO();
audit.setCommitStaffName(clerk.getClerkName());
audit.setCommitStaffId(staffId);
audit.setCommitStaffImg(staff.getHeadImg());
audit.setCommitStoreId(clerk.getStoreId());
audit.setCommitStoreName(store.getStoreName());
audit.setAuditStatus(4);
audit.setWxEnterpriseId(wxEnterpriseId);
audit.setEnterpriseId(store.getEnterpriseId());
audit.setStatusFlag(1);
audit.setRelatedId(staffId);
JSONObject json = new JSONObject();
json.put("clerkId", clerkId);
json.put("clerkCode", clerkCode);
json.put("clerkName", clerk.getClerkName());
json.put("staffName", staff.getStaffName());
json.put("staffId", staffId);
json.put("wxUserId", wxUserId);
json.put("headPic", staff.getHeadImg());
audit.setOldValue(json.toJSONString());
audit.setCommitTime(new Date());
audit.setAuditType(2);
auditApiService.insert(audit);
return resultResponse(HaoBanErrCode.ERR_1);
}else{
//需要审核
......@@ -568,7 +594,8 @@ public class ClerkController extends WebBaseController{
audit.setWxEnterpriseId(wxEnterpriseId);
audit.setEnterpriseId(store.getEnterpriseId());
audit.setStatusFlag(1);
audit.setRelatedId(staffId);
JSONObject json = new JSONObject();
json.put("clerkId", clerkId);
json.put("clerkCode", clerkCode);
......@@ -615,6 +642,7 @@ public class ClerkController extends WebBaseController{
audit.setWxEnterpriseId(staffClerkRelation.getWxEnterpriseId());
audit.setEnterpriseId(store.getEnterpriseId());
audit.setStatusFlag(1);
audit.setRelatedId(staffId);
JSONObject json = new JSONObject();
json.put("clerkId", clerkId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment