Browse Source

上报咨询员功能修改

user5 4 years atrás
parent
commit
7e7f510a2e

+ 21 - 0
src/main/java/com/jeeplus/modules/workinvoice/entity/WorkInvoice.java

@@ -81,6 +81,11 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	private List<WorkInvoiceProjectRelation> workInvoiceProjectRelationList;//开票和项目关系表
 	private Integer notifyFlag; //代办判定条件
 	private String notifyId; //代办判定条件
+
+
+	private String accountCheckingUserId; //对账人id
+	private String accountCheckingUserName; //对账人名称
+
 	public String getOfficeId() {
 		return officeId;
 	}
@@ -546,4 +551,20 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	public void setWorkInvoiceProjectRelationList(List<WorkInvoiceProjectRelation> workInvoiceProjectRelationList) {
 		this.workInvoiceProjectRelationList = workInvoiceProjectRelationList;
 	}
+
+	public String getAccountCheckingUserId() {
+		return accountCheckingUserId;
+	}
+
+	public void setAccountCheckingUserId(String accountCheckingUserId) {
+		this.accountCheckingUserId = accountCheckingUserId;
+	}
+
+	public String getAccountCheckingUserName() {
+		return accountCheckingUserName;
+	}
+
+	public void setAccountCheckingUserName(String accountCheckingUserName) {
+		this.accountCheckingUserName = accountCheckingUserName;
+	}
 }

+ 11 - 5
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java

@@ -242,7 +242,9 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 			}
 			projectRelation.setInvoiceId(workInvoice.getId());
 			//新增开票和项目关联信息
-			dao.insertProjectRelation(projectRelation);
+			if (WorkInvoiceReceipt.DEL_FLAG_NORMAL.equals(projectRelation.getDelFlag())) {
+				dao.insertProjectRelation(projectRelation);
+			}
 		}
 	}
 
@@ -256,10 +258,12 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 		List<String> projectNameList = Lists.newArrayList();
 		if(null != workInvoice.getWorkInvoiceProjectRelationList()){
 			for (WorkInvoiceProjectRelation projectRelation : workInvoice.getWorkInvoiceProjectRelationList()) {
-				if(StringUtils.isNotBlank(projectRelation.getProjectId())){
-					ProjectRecords projectRecords = projectRecordsService.getRuralMasters(projectRelation.getProjectId());
-					if(null != projectRecords){
-						projectNameList.add(projectRecords.getProjectName());
+				if (WorkInvoiceReceipt.DEL_FLAG_NORMAL.equals(projectRelation.getDelFlag())) {
+					if (StringUtils.isNotBlank(projectRelation.getProjectId())) {
+						ProjectRecords projectRecords = projectRecordsService.getRuralMasters(projectRelation.getProjectId());
+						if (null != projectRecords) {
+							projectNameList.add(projectRecords.getProjectName());
+						}
 					}
 				}
 			}
@@ -1347,6 +1351,8 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 				}
 			}
 			workInvoiceDao.update(workInvoice);
+			//开票与项目关系处理
+			updateWorkInvoiceProjectRelationInfo(workInvoice);
 			return "保存审核意见成功!";
 	}
 

+ 6 - 3
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -368,7 +368,8 @@
 			province,
 			ext,
 			billing_content,
-			cancellation_remark
+			cancellation_remark,
+			account_checking_user_id
 		) VALUES (
 			#{id},
 			#{number},
@@ -407,7 +408,8 @@
 			#{province},
 			#{ext},
 			#{billingContent},
-			#{cancellationRemark}
+			#{cancellationRemark},
+			#{accountCheckingUserId}
 		)
 	</insert>
 
@@ -446,7 +448,8 @@
 			province = #{province},
 			ext = #{ext},
 			billing_content = #{billingContent},
-			cancellation_remark = #{cancellationRemark}
+			cancellation_remark = #{cancellationRemark},
+			account_checking_user_id = #{accountCheckingUserId}
 		WHERE id = #{id}
 	</update>
 

+ 3 - 3
src/main/webapp/webpage/modules/workinvoice/workInvoiceForm.jsp

@@ -603,9 +603,9 @@
 				</div>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label">对账人:</label>
-					<div class="layui-input-block">
-						<sys:treeselect id="master" name="master.id" value="" labelName="master.name" labelValue=""
-										title="负责人" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+					<div class="layui-input-block  with-icon">
+						<sys:treeselect id="master" name="accountCheckingUserId" value="${workInvoice.accountCheckingUserId}" labelName="accountCheckingUserName" labelValue="${workInvoice.accountCheckingUserName}"
+										cssStyle="background-color: #fff" title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
 					</div>
 				</div>
 			</div>