手持发起oa

master
zhaoxiaolin 6 months ago
parent 183e40745f
commit 30c0376ac7

@ -1440,6 +1440,12 @@ public class ProOrderServiceImpl implements IProOrderService {
/**pro_order_workorder_batch**/
if(!CollectionUtils.isEmpty(workBatchs)) {
if(workBatchs.size()>100){
logger.error("批次太多,请检查产品批次数量是否设置正常。");
return R.fail("批次太多,请检查产品批次数量是否设置正常。");
}
int pn = proOrderWorkorderBatchMapper.insertWorkorderBatchs(workBatchs);
System.out.println("pn:"+pn);
}

@ -2,24 +2,19 @@ package com.op.quality.controller;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.domain.R;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.web.page.TableDataInfo;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*;
import com.op.quality.service.*;
import com.op.system.api.RemoteMesService;
import com.op.system.api.domain.SysDictData;
import com.op.system.api.domain.SysUser;
import com.op.system.api.domain.dto.WCSDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;
/**
@ -233,6 +228,20 @@ public class QuaController extends BaseController {
// }
return toAjax(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskIncome));
}
@PostMapping(value = "getUserIdList")
public List<SysUser> getUserIdList(@RequestBody SysUser sysUser) {
DynamicDataSourceContextHolder.push("master");
return qcCheckTaskIncomeService.getUserIdList(sysUser);
}
@PostMapping(value = "/getOaUserId")
public SysUser getOaUserId(@RequestBody SysUser sysUser) {
DynamicDataSourceContextHolder.push("master");
return qcCheckTaskIncomeService.getOaUserId(sysUser);
}
/**
*
*/

@ -203,6 +203,105 @@ public class QcCheckTaskIncome extends BaseEntity {
private String sampleAql;
private String reason;
private String sfgyswt;//是否供应商问题
private String czbjr;//仓储报检人
private String zcf;//转出方
private String zcoemcm;//转出OEM厂名
private String qczg;//QC主管
private String sqr;//申请人
private String oaFactory;//厂区
private String sqbm;//申请部门
private String sfxyzg;//是否需要主管审核
private String pgzg;//QC主管SFXYZG字段为"是",则此项选择QC主管信息
private String pgzr;//质量主管
private String oaFactoryF;//异常范围
public String getOaFactoryF() {
return oaFactoryF;
}
public void setOaFactoryF(String oaFactoryF) {
this.oaFactoryF = oaFactoryF;
}
public String getSfxyzg() {
return sfxyzg;
}
public void setSfxyzg(String sfxyzg) {
this.sfxyzg = sfxyzg;
}
public String getPgzg() {
return pgzg;
}
public void setPgzg(String pgzg) {
this.pgzg = pgzg;
}
public String getPgzr() {
return pgzr;
}
public void setPgzr(String pgzr) {
this.pgzr = pgzr;
}
public String getSqbm() {
return sqbm;
}
public void setSqbm(String sqbm) {
this.sqbm = sqbm;
}
public String getOaFactory() {
return oaFactory;
}
public void setOaFactory(String oaFactory) {
this.oaFactory = oaFactory;
}
public String getSqr() {
return sqr;
}
public void setSqr(String sqr) {
this.sqr = sqr;
}
public String getQczg() {
return qczg;
}
public void setQczg(String qczg) {
this.qczg = qczg;
}
public String getZcf() {
return zcf;
}
public void setZcf(String zcf) {
this.zcf = zcf;
}
public String getZcoemcm() {
return zcoemcm;
}
public void setZcoemcm(String zcoemcm) {
this.zcoemcm = zcoemcm;
}
public String getCzbjr() {
return czbjr;
}
public void setCzbjr(String czbjr) {
this.czbjr = czbjr;
}
public String getSfgyswt() {
return sfgyswt;

@ -125,6 +125,69 @@ public class QcCheckUnqualified extends BaseEntity {
private String user;
private String sqr;
private String sfgyswt;//是否供应商问题
private String zcf;//转出方
private String zcoemcm;//转出OEM厂名
private String sqbm;//申请部门
private String sfxyzg;//是否需要主管审核
private String pgzg;//QC主管SFXYZG字段为"是",则此项选择QC主管信息
private String pgzr;//质量主管
private String oaFactoryF;
public String getOaFactoryF() {
return oaFactoryF;
}
public void setOaFactoryF(String oaFactoryF) {
this.oaFactoryF = oaFactoryF;
}
public String getSfxyzg() {
return sfxyzg;
}
public void setSfxyzg(String sfxyzg) {
this.sfxyzg = sfxyzg;
}
public String getPgzg() {
return pgzg;
}
public void setPgzg(String pgzg) {
this.pgzg = pgzg;
}
public String getPgzr() {
return pgzr;
}
public void setPgzr(String pgzr) {
this.pgzr = pgzr;
}
public String getSqbm() {
return sqbm;
}
public void setSqbm(String sqbm) {
this.sqbm = sqbm;
}
public String getZcf() {
return zcf;
}
public void setZcf(String zcf) {
this.zcf = zcf;
}
public String getZcoemcm() {
return zcoemcm;
}
public void setZcoemcm(String zcoemcm) {
this.zcoemcm = zcoemcm;
}
public String getSfgyswt() {
return sfgyswt;

@ -134,4 +134,8 @@ public interface QcCheckTaskIncomeMapper {
String getSampleQua(QcCheckTaskIncome qcCheckTaskIncome);
Integer getnoOkVals(QcCheckTaskIncome qcCheckTaskIncome);
List<SysUser> getUserIdList(SysUser getUserIdList);
SysUser getOaUserId(SysUser getUserIdList);
}

@ -106,4 +106,7 @@ public interface IQcCheckTaskIncomeService {
QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income);
List<SysUser> getUserIdList(SysUser sysUser);
SysUser getOaUserId(SysUser sysUser);
}

@ -814,11 +814,31 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
unqualified.setRemark(qcCheckTaskIncome.getRemark());
if("produce".equals(qcCheckTaskIncome.getTypeCode())){
unqualified.setSfgyswt(qcCheckTaskIncome.getSfgyswt());
//申请人-
unqualified.setSqr(qcCheckTaskIncome.getSqr());
//申请部门
unqualified.setSqbm(qcCheckTaskIncome.getSqbm());
//实际生产数量
unqualified.setQuality(qcCheckTaskIncome.getQuality().toString());
//发现地点
unqualified.setCheckLoc(qcCheckTaskIncome.getCheckLoc());
//是否需要主管审核
unqualified.setSfgyswt(qcCheckTaskIncome.getSfgyswt());
if(qcCheckTaskIncome.getSfgyswt().equals("0")){//是
//qc主管
unqualified.setPgzg(qcCheckTaskIncome.getPgzg());
//质量主管
unqualified.setPgzr(qcCheckTaskIncome.getPgzr());
}
//是否供应商问题
unqualified.setSfgyswt(qcCheckTaskIncome.getSfgyswt());
}else if("material".equals(qcCheckTaskIncome.getTypeCode())){
unqualified.setTypeCode(qcCheckTaskIncome.getTypeCode());
//厂区(小榄固定值)
unqualified.setOaFactory("0");
unqualified.setOaFactory(qcCheckTaskIncome.getOaFactory());
//来料类别
unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType());
//物料来源
@ -842,16 +862,20 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
//检验编号
unqualified.setCheckNo(qcCheckTaskIncome.getCheckNo());
//仓储报检人-李爱娟
unqualified.setCzbjr("284");
unqualified.setCzbjr(qcCheckTaskIncome.getCzbjr());
//物料类别
unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType());
//物料来源
unqualified.setMaterialFrom(qcCheckTaskIncome.getMaterialFrom());
//QC主管-朱继新
unqualified.setQczg("660");
//申请人-朱继新
unqualified.setSqr("660");
unqualified.setQczg(qcCheckTaskIncome.getQczg());
//申请人-
unqualified.setSqr(qcCheckTaskIncome.getSqr());
unqualified.setUser(qcCheckTaskIncome.getUpdateBy());
//转出方
unqualified.setZcf(qcCheckTaskIncome.getUpdateBy());
//转出OEM厂名
unqualified.setZcoemcm(qcCheckTaskIncome.getUpdateBy());
}
qcCheckUnqualifiedService.updateQcCheckUnqualified(unqualified);
@ -958,4 +982,14 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
public QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income) {
return qcCheckTaskIncomeMapper.hasIncomeTask(income);
}
@Override
public List<SysUser> getUserIdList(SysUser getUserIdList) {
return qcCheckTaskIncomeMapper.getUserIdList(getUserIdList);
}
@Override
public SysUser getOaUserId(SysUser getUserIdList) {
return qcCheckTaskIncomeMapper.getOaUserId(getUserIdList);
}
}

@ -6,6 +6,7 @@ import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.security.utils.SecurityUtils;
import com.op.system.api.domain.quality.OAInfo;
@ -188,10 +189,14 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
paramMap.put("requestName","ZL0010-来料检验不合格控制流程");//流程名称
paramMap.put("workflowId",113454);//该流程对应的唯- workFlowld
if(StringUtils.isEmpty(task.getIncomeBatchNo())){
task.setIncomeBatchNo(DateUtils.parseDateToStr("yyyy-MM-dd",new Date()));
}
StringBuffer mainObject = new StringBuffer();
mainObject.append("{");
mainObject.append("\"SQR\":"+"\""+task.getSqr()+"\"");//申请人
mainObject.append(",\"CQ\":"+task.getOaFactory());//厂区
mainObject.append("\"SQR\":"+"\""+task.getSqr()+"\"");//申请人--
mainObject.append(",\"CQ\":"+task.getOaFactory());//厂区--
mainObject.append(",\"LLLB\":"+task.getMaterialType());//来料类别【0、1】
mainObject.append(",\"MATNR\":"+"\""+task.getMaterialCode()+"\"");//物料编码
mainObject.append(",\"MAKTX\":"+"\""+task.getMaterialName()+"\"");//物料名称
@ -200,11 +205,14 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
mainObject.append(",\"CHARG\":"+"\""+task.getIncomeBatchNo()+"\"");//生产批号
mainObject.append(",\"comeQty\":"+"\""+task.getQuality()+"\"");//来料数量
mainObject.append(",\"DW\":"+"\""+task.getUnit()+"\"");//来料单位
mainObject.append(",\"testDate\":"+"\""+DateUtils.parseDateToStr("yyyy-MM-dd",new Date())+"\"");//检验日期
mainObject.append(",\"JYBH\":"+"\""+task.getCheckNo()+"\"");//检验编码
mainObject.append(",\"BJY\":"+"\""+task.getCzbjr()+"\"");//仓储报检人
mainObject.append(",\"BJY\":"+"\""+task.getCzbjr()+"\"");//仓储报检人--
mainObject.append(",\"WLLY\":"+"\""+task.getMaterialFrom()+"\"");//物料来源
mainObject.append(",\"ZCF\":"+"\""+task.getZcf()+"\"");//转出方
mainObject.append(",\"ZCOEMCM \":"+"\""+task.getZcoemcm()+"\"");//转出OEM厂名
mainObject.append(",\"memo\":"+"\""+task.getRemark()+"\"");//不合格描述
mainObject.append(",\"PZGLBZG\":"+"\""+task.getQczg()+"\"");//qc主管
mainObject.append(",\"PZGLBZG\":"+"\""+task.getQczg()+"\"");//qc主管--
mainObject.append("}");
paramMap.put("mainObject",mainObject.toString());
@ -271,7 +279,7 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
return oaR;
}
/**
/**-
{
"user": "999999",
"requestLevel": "0", 0
@ -306,7 +314,7 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(task.getTaskId());
//发起来料检验OA流程
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("user",SecurityUtils.getUsername());//提交人工号
paramMap.put("user",task.getSqr());//提交人工号
paramMap.put("requestLevel",0);//流程紧急度
paramMap.put("requestName","ZL0030-品质异常流程-智能制造-"+DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",detailInfo.getIncomeTime())+"(产品名称:"+detailInfo.getMaterialName()+"");//流程名称
paramMap.put("workflowId",113455);//该流程对应的唯- workFlowld
@ -315,22 +323,22 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
mainObject.append("{");
mainObject.append("\"CPMC\":"+detailInfo.getMaterialName());//产品名称
mainObject.append(",\"CPBM\":"+detailInfo.getMaterialCode());//产品编码
mainObject.append(",\"SQBM\":"+"\"0\"");//0品质保障部
mainObject.append(",\"SQR\":"+"\""+SecurityUtils.getUsername()+"\"");//申请人:默认当前用户
mainObject.append(",\"SQSJ\":"+"\""+DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",detailInfo.getCheckTime())+"\"");//申请时间
mainObject.append(",\"SQBM\":"+task.getSqbm());//0品质保障部
mainObject.append(",\"SQR\":"+"\""+task.getSqr()+"\"");//申请人:默认当前用户
mainObject.append(",\"SQSJ\":"+"\""+DateUtils.parseDateToStr("yyyy-MM-dd",detailInfo.getCheckTime())+"\"");//申请时间
mainObject.append(",\"SCCJ\":"+"\"162\"");//所属车间
mainObject.append(",\"SCPH\":"+"\""+detailInfo.getIncomeBatchNo()+"\"");//生产批号
mainObject.append(",\"SCSL\":"+"\""+detailInfo.getQuality()+"\"");//生产数量
mainObject.append(",\"FXDD\":"+"\""+detailInfo.getCheckLoc()+"\"");//发现地点
mainObject.append(",\"SCSL\":"+"\""+task.getQuality()+"\"");//生产数量
mainObject.append(",\"FXDD\":"+"\""+task.getCheckLoc()+"\"");//发现地点
mainObject.append(",\"FXRQ\":"+"\""+DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",detailInfo.getCheckTime())+"\"");//发现日期
mainObject.append(",\"BH\":"+"\""+detailInfo.getCheckNo()+"\"");//编号:流水号 年月日+四位流水号
mainObject.append(",\"YCFW\":"+"\"1\"");//*异常范围:下拉框榄菊所有工厂 1代表小榄工厂
mainObject.append(",\"YCFW\":"+task.getOaFactoryF()+"\"");//*异常范围:下拉框榄菊所有工厂 1代表小榄工厂
mainObject.append(",\"PZYCMS\":"+"\""+detailInfo.getRemark()+"\"");//品质异常描述
mainObject.append(",\"Notes\":"+"\"\"");//测试备注
mainObject.append(",\"SFXYZG\":"+"\"0\"");//*是否需要主管审核 1否 0是
mainObject.append(",\"PGZG\":"+"\"660\"");//QC主管SFXYZG字段为"是",则此项选择QC主管信息
mainObject.append(",\"PGZR\":"+"\"660\"");//质量主管 660朱继新
mainObject.append(",\"SFGYSWT\":"+"\"1\"");//*是否供应商问题 1非供应商问题 0是供应商问题
mainObject.append(",\"SFXYZG\":"+"\""+task.getSfxyzg()+"\"");//*是否需要主管审核 1否 0是
mainObject.append(",\"PGZG\":"+"\""+task.getPgzg()+"\"");//QC主管SFXYZG字段为"是",则此项选择QC主管信息
mainObject.append(",\"PGZR\":"+"\""+task.getPgzr()+"\"");//质量主管 660朱继新
mainObject.append(",\"SFGYSWT\":"+task.getSfgyswt()+"\"");//*是否供应商问题 1非供应商问题 0是供应商问题
mainObject.append("}");

@ -573,6 +573,14 @@
from qc_sample_rule_aql
where del_flag='0' and sample_code like concat(#{sampleCode},'%')
</select>
<select id="getUserIdList" resultType="com.op.system.api.domain.SysUser">
select oa_user_id userId,
nick_name userName
from sys_user where dept_id = #{deptId} and del_flag='0'
</select>
<select id="getOaUserId" resultType="com.op.system.api.domain.SysUser">
select oa_user_id userId from sys_user WHERE user_name = #{userCode} and del_flag='0'
</select>
<!--批量更新原始表-->
<update id="updateIncomeBatchList">

@ -99,8 +99,8 @@
qcp.check_mode checkMode
<!--,qcp.check_standard checkStandard-->
from qc_check_type_project qctp
left join qc_check_project qcp on qcp.id = qctp.project_id and qcp.del_flag = '0'
where qctp.del_flag = '0' and qctp.status = '1'
left join qc_check_project qcp on qcp.id = qctp.project_id
where qctp.del_flag = '0' and qctp.status = '1' and qcp.del_flag = '0'<!--不能移动,移动后会吧删除的数据也展示出来-->
and qctp.material_code = #{materialCode}
and qctp.type_id = #{typeId}
order by qctp.sort

Loading…
Cancel
Save