物料对称修改
This commit is contained in:
parent
35e42a5e0b
commit
1cc4d5e064
|
@ -71,6 +71,15 @@ public class ZjMaterielSynchronizationEventEntity extends BaseEntity {
|
|||
private String caccId;//
|
||||
private String field0049;//认证信息
|
||||
private String field0049code;//认证信息
|
||||
private String querycode;//
|
||||
|
||||
public String getQuerycode() {
|
||||
return querycode;
|
||||
}
|
||||
|
||||
public void setQuerycode(String querycode) {
|
||||
this.querycode = querycode;
|
||||
}
|
||||
|
||||
public String getFormmain_id() {
|
||||
return formmain_id;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
parameterType = "com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity">
|
||||
SELECT max(cInvCode) from Inventory
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="field0043code != null and field0043code != ''"> and cInvCCode = #{field0043code} and cInvCode like concat(#{field0043code},'%') </if>
|
||||
<if test="field0043code != null and field0043code != ''"> and cInvCCode = #{field0043code} and cInvCode like concat(#{querycode},'%') </if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -353,9 +353,7 @@ public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMat
|
|||
|
||||
//获取最大流水号
|
||||
Integer maxnum = null;
|
||||
if(lsh.get(entity.getField0043code()) != null){
|
||||
maxnum = lsh.get(entity.getField0043code());
|
||||
}
|
||||
|
||||
StringBuffer wlcode = new StringBuffer();
|
||||
//设置编码
|
||||
if("新增".equals(entity.getField0018code()) ){
|
||||
|
@ -364,6 +362,7 @@ public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMat
|
|||
|| entity.getField0043code().equals("12418")
|
||||
|| entity.getField0043code().equals("12001")
|
||||
|| entity.getField0043code().equals("12003")
|
||||
|| entity.getField0043code().equals("12900")
|
||||
|| entity.getField0043code().equals("12005")){
|
||||
//货品分类(12400-贴片电阻, 12500-贴片电容, 12418-贴片检测电阻, 12001-单面板, 12003-双面板, 12005-多层板)
|
||||
//封装分类(贴片 0 , 其他 0 )
|
||||
|
@ -375,8 +374,12 @@ public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMat
|
|||
// 整体逻辑 12400物料分类 0贴片 002流水号 01品牌号
|
||||
//例:12400 0 002 01
|
||||
//货品分类以这几个开头的。封装分类是贴片,依然填0
|
||||
if(lsh.get(entity.getField0043code()) != null){
|
||||
maxnum = lsh.get(entity.getField0043code());
|
||||
}
|
||||
if(maxnum == null){
|
||||
entity.setDataSourceCode(zju8);
|
||||
entity.setQuerycode(entity.getField0043code());
|
||||
String num = zjMaterielSynchronizationEventDao.queryMaxLsh(entity);
|
||||
num = num.substring(entity.getField0043code().length(),entity.getField0043code().length()+4);
|
||||
maxnum = Integer.valueOf(num);
|
||||
|
@ -403,8 +406,20 @@ public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMat
|
|||
//是:勾选存货属性的委外,计划页面的委外属性
|
||||
//否:取消勾选勾选存货属性的”委外”,计划页面的委外属性设置成“采购”
|
||||
// 整体逻辑 12100物料分类 0非贴片 002流水号 01品牌号
|
||||
if(lsh.get(entity.getField0043code()) != null){
|
||||
if(entity.getField0017code() != null && "贴片".equals(entity.getField0017code())){
|
||||
maxnum = lsh.get(entity.getField0043code()+9);
|
||||
}else {
|
||||
maxnum = lsh.get(entity.getField0043code()+0);
|
||||
}
|
||||
}
|
||||
if(maxnum == null){
|
||||
entity.setDataSourceCode(zju8);
|
||||
if(entity.getField0017code() != null && "贴片".equals(entity.getField0017code())){
|
||||
entity.setQuerycode(entity.getField0043code()+9);
|
||||
}else {
|
||||
entity.setQuerycode(entity.getField0043code()+0);
|
||||
}
|
||||
String num = zjMaterielSynchronizationEventDao.queryMaxLsh(entity);
|
||||
num = num.substring(entity.getField0043code().length()+1,entity.getField0043code().length()+4);
|
||||
maxnum = Integer.valueOf(num);
|
||||
|
@ -428,14 +443,18 @@ public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMat
|
|||
}else {
|
||||
wlcode.append("00");
|
||||
}
|
||||
}else if(entity.getField0043code().startsWith("6") || entity.getField0043code().startsWith("7") || entity.getField0043code().startsWith("8") || entity.getField0043code().startsWith("8")){
|
||||
}else if(entity.getField0043code().startsWith("6") || entity.getField0043code().startsWith("7") || entity.getField0043code().startsWith("8") || entity.getField0043code().startsWith("9")){
|
||||
//货品分类(区分是否是”产品”通过分类首位6,7,8,9)
|
||||
//当前分类最大流水号(编码第6-9是顺序号)
|
||||
//最后2位默认11
|
||||
//整体逻辑 62100物料分类 0001流水 11默认
|
||||
//例:62100 0001 11
|
||||
if(lsh.get(entity.getField0043code()) != null){
|
||||
maxnum = lsh.get(entity.getField0043code());
|
||||
}
|
||||
if(maxnum == null){
|
||||
entity.setDataSourceCode(zju8);
|
||||
entity.setQuerycode(entity.getField0043code());
|
||||
String num = zjMaterielSynchronizationEventDao.queryMaxLsh(entity);
|
||||
num = num.substring(entity.getField0043code().length(),entity.getField0043code().length()+4);
|
||||
maxnum = Integer.valueOf(num);
|
||||
|
@ -452,8 +471,12 @@ public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMat
|
|||
//最后1位默认1
|
||||
//整体逻辑 A0110物料分类 00001流水 1默认
|
||||
//例:A0110 00001 1
|
||||
if(lsh.get(entity.getField0043code()) != null){
|
||||
maxnum = lsh.get(entity.getField0043code());
|
||||
}
|
||||
if(maxnum == null){
|
||||
entity.setDataSourceCode(zju8);
|
||||
entity.setQuerycode(entity.getField0043code());
|
||||
String num = zjMaterielSynchronizationEventDao.queryMaxLsh(entity);
|
||||
num = num.substring(entity.getField0043code().length(),entity.getField0043code().length()+5);
|
||||
maxnum = Integer.valueOf(num);
|
||||
|
|
Loading…
Reference in New Issue