Commit a6284edf by 宋祥

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

parents 473598a3 310b4315
......@@ -340,6 +340,11 @@ public class HPSqlConstant {
// 已处理
public static final String DO_PROCESS = "HPZL001.doProcess";
// 已处理
public static final String DO_PROCESS2 = "HPZL001.doProcess2";
}
}
......@@ -14,10 +14,7 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.*;
import com.baosight.iplat4j.config.AdminFactoryConfig;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -27,6 +24,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.text.SimpleDateFormat;
import java.util.*;
/**
......@@ -153,10 +151,12 @@ public class ServiceHPMT002 extends ServiceBase {
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
EiInfo outInfo = new EiInfo();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.ORG_PROD_BLOCK_ID), null, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.ORG_PROD_BLOCK_ID), sqlMap, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), sqlMap, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), sqlMap, false);
return outInfo;
}
......@@ -180,28 +180,31 @@ public class ServiceHPMT002 extends ServiceBase {
sqlMap.put("companyCode", companyCode);
sqlMap.put("projCode", projCode);
sqlMap.put("prodOrderNo", prodOrderNo);
HPSC005 HPSC005 =(HPSC005) dao.query("HPSC005.query",sqlMap );
List<HPSC005> HPSC005 = dao.query("HPSC005.query", sqlMap);
HPZL001 fZl001 = new HPZL001();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
fZl001.fromMap(queryMap);
fZl001.setProjName(HPSC005.getProjName());
fZl001.setOrgName(HPSC005.getOrgName());
fZl001.setInventName(HPSC005.getPrdtName());
fZl001.setSubInventName(HPSC005.getPartName());
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
fZl001.setProjName(HPSC005.get(0).getProjName());
fZl001.setOrgName(HPSC005.get(0).getOrgName());
fZl001.setInventName(HPSC005.get(0).getPrdtName());
fZl001.setSubInventName(HPSC005.get(0).getPartName());
fZl001.setCreatedTime(sdf.format(new Date()));
fZl001.setReceiptDate(DateUtils.shortDate());
// 生成单据号
fZl001.setCheckNo(SequenceGenerator.getNextSequence(
HPConstant.SequenceId.HPZL001_NUMBER));
fZl001.setDeleteFlag(CommonConstant.YesNo.NO_0);
fZl001.setStatus(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL001.INSERT, fZl001);
//处理文件
Map fZl0012 = new HashMap();
fZl0012.put("checkNo", fZl001.getCheckNo());
HPZL001 HPZL001 =(HPZL001) dao.query("HPZL001.query",fZl0012);
//绑定文件
if(!fZl001.getCheckNo().equals(" ")) {
Map fZl0012 = new HashMap();
fZl0012.put("checkNo", fZl001.getCheckNo());
HPZL001 HPZL001 = (HPZL001) dao.query("HPZL001.query", fZl0012);
//绑定文件
String[] docIds = docId.split(",");
int num=0;
while (num<=docIds.length){
int num = 0;
while (num <= docIds.length) {
HPSC002A HPSC002A = new HPSC002A();
HPSC002A.setBizType(CommonConstant.YesNo.NO_0.toString());
HPSC002A.setDocId(docIds[num]);
......@@ -210,6 +213,7 @@ public class ServiceHPMT002 extends ServiceBase {
DaoUtils.insert(HPSC002A.INSERT, HPSC002A);
num++;
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("新增成功!");
} catch (Exception e) {
......@@ -237,24 +241,25 @@ public class ServiceHPMT002 extends ServiceBase {
fZl001.fromMap(queryMap);
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
fZl001.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPSqlConstant.HPZL001.DO_PROCESS, fZl001);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
fZl001.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPSqlConstant.HPZL001.DO_PROCESS2, fZl001);
//绑定文件
String[] docIds = docId.split(",");
int num=0;
while (num<=docIds.length){
HPSC002A HPSC002A = new HPSC002A();
HPSC002A.setBizType(CommonConstant.YesNo.NO_0.toString());
HPSC002A.setDocId(docIds[num]);
HPSC002A.setMatId(fZl001.getId());
HPSC002A.setCompanyCode(companyCode);
DaoUtils.insert(HPSC002A.INSERT, HPSC002A);
num++;
if(!docId.equals(" ")) {
String[] docIds = docId.split(",");
int num = 0;
while (num <= docIds.length) {
HPSC002A HPSC002A = new HPSC002A();
HPSC002A.setBizType(CommonConstant.YesNo.NO_0.toString());
HPSC002A.setDocId(docIds[num]);
HPSC002A.setMatId(fZl001.getId());
HPSC002A.setCompanyCode(companyCode);
DaoUtils.insert(HPSC002A.INSERT, HPSC002A);
num++;
}
}
inInfo.setMsg("新增成功!");
inInfo.setMsg("处理成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
LogUtils.setDetailMsg(inInfo, e, "处理失败");
}
return inInfo;
}
......
......@@ -188,6 +188,17 @@
WHERE ID = #id#
</update>
<!-- 移动端已处理 -->
<update id="doProcess2">
UPDATE hpjx.t_hpzl001
SET
STATUS = #status#,
CHECK_USER = #checkUser#, <!-- 检查人 -->
CHECK_USER_NAME = #checkUserName#, <!-- 检查人名称 -->
<include refid="updateRevise"/>
WHERE CHECK_NO = #checkNo#
</update>
<!-- 更新附件信息 -->
<update id="updateAffix">
UPDATE hpjx.t_hpzl001
......
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