fix():产出实绩修改,钢卷上下线修改
This commit is contained in:
@@ -29,6 +29,13 @@ public class CrmPdiPlanController {
|
|||||||
return R.ok(crmPdiPlanService.getByCoilIdAndOperId(coilid));
|
return R.ok(crmPdiPlanService.getByCoilIdAndOperId(coilid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getOnlineCoil")
|
||||||
|
@ApiOperation("通过钢卷号或者状态查询计划")
|
||||||
|
public R<CrmPdiPlan> getByCoilId() {
|
||||||
|
return R.ok(crmPdiPlanService.getOnlineCoil());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/getCoilInfoAndSetupList")
|
@GetMapping("/getCoilInfoAndSetupList")
|
||||||
@ApiOperation("通过钢卷号获取钢卷信息和设定值列表")
|
@ApiOperation("通过钢卷号获取钢卷信息和设定值列表")
|
||||||
public R<PdiPlanSetupInfoVO> getCoilInfoAndSetupList(@RequestParam String coilid) {
|
public R<PdiPlanSetupInfoVO> getCoilInfoAndSetupList(@RequestParam String coilid) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public class CrmPdoExcoilController {
|
|||||||
|
|
||||||
@DeleteMapping("/delete/{excoilid}/{operid}")
|
@DeleteMapping("/delete/{excoilid}/{operid}")
|
||||||
@ApiOperation("删除实绩")
|
@ApiOperation("删除实绩")
|
||||||
|
|
||||||
public R<Boolean> delete(@PathVariable String excoilid, @PathVariable Integer operid) {
|
public R<Boolean> delete(@PathVariable String excoilid, @PathVariable Integer operid) {
|
||||||
return R.ok(crmPdoExcoilService.deleteCrmPdoExcoil(excoilid, operid));
|
return R.ok(crmPdoExcoilService.deleteCrmPdoExcoil(excoilid, operid));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
package com.fizz.business.controller;
|
package com.fizz.business.controller;
|
||||||
|
|
||||||
import com.fizz.business.domain.SteelGradeInfo;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.fizz.business.domain.StdAlloy;
|
||||||
import com.fizz.business.service.SteelGradeInfoService;
|
import com.fizz.business.service.SteelGradeInfoService;
|
||||||
|
import com.fizz.business.vo.StdAlloyVO;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@@ -21,19 +25,52 @@ public class SteelGradeInfoController {
|
|||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询钢种列表")
|
@ApiOperation("查询钢种列表")
|
||||||
public R<List<SteelGradeInfo>> list() {
|
public R<List<StdAlloyVO>> list() {
|
||||||
return R.ok(steelGradeInfoService.list());
|
|
||||||
|
// 使用 LambdaQueryWrapper 查询 StdAlloy 表中的数据
|
||||||
|
LambdaQueryWrapper<StdAlloy> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.select(StdAlloy::getGradeid, StdAlloy::getName); // 只查询 gradeId 和 name 字段
|
||||||
|
|
||||||
|
// 查询 StdAlloy 数据
|
||||||
|
List<StdAlloy> stdAlloyList = steelGradeInfoService.list(queryWrapper);
|
||||||
|
|
||||||
|
// 使用 BeanUtils 将 StdAlloy 对象的字段映射到 StdAlloyVO
|
||||||
|
List<StdAlloyVO> stdAlloyVOList = new ArrayList<>();
|
||||||
|
for (StdAlloy stdAlloy : stdAlloyList) {
|
||||||
|
StdAlloyVO stdAlloyVO = new StdAlloyVO();
|
||||||
|
BeanUtils.copyProperties(stdAlloy, stdAlloyVO); // 将 StdAlloy 属性复制到 StdAlloyVO
|
||||||
|
stdAlloyVOList.add(stdAlloyVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回结果
|
||||||
|
return R.ok(stdAlloyVOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/info")
|
||||||
|
@ApiOperation("查询单个钢种详情")
|
||||||
|
public R<StdAlloy> getSteelGradeInfo(@RequestParam Integer gradeid) {
|
||||||
|
|
||||||
|
// 使用 LambdaQueryWrapper 查询 StdAlloy 表中的数据
|
||||||
|
LambdaQueryWrapper<StdAlloy> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(StdAlloy::getGradeid, gradeid); // 只查询 gradeId 和 name 字段
|
||||||
|
|
||||||
|
// 查询 StdAlloy 数据
|
||||||
|
StdAlloy stdAlloyList = steelGradeInfoService.getById(queryWrapper);
|
||||||
|
|
||||||
|
// 返回结果
|
||||||
|
return R.ok(stdAlloyList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新增")
|
@ApiOperation("新增")
|
||||||
public R<Boolean> add(@RequestBody SteelGradeInfo steelGradeInfo) {
|
public R<Boolean> add(@RequestBody StdAlloy steelGradeInfo) {
|
||||||
return R.ok(steelGradeInfoService.save(steelGradeInfo));
|
return R.ok(steelGradeInfoService.save(steelGradeInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@ApiOperation("更新")
|
@ApiOperation("更新")
|
||||||
public R<Boolean> update(@RequestBody SteelGradeInfo steelGradeInfo) {
|
public R<Boolean> update(@RequestBody StdAlloy steelGradeInfo) {
|
||||||
return R.ok(steelGradeInfoService.updateById(steelGradeInfo));
|
return R.ok(steelGradeInfoService.updateById(steelGradeInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.fizz.business.domain;
|
package com.fizz.business.domain;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -10,6 +11,10 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class ModCoilMap {
|
public class ModCoilMap {
|
||||||
|
|
||||||
|
@TableField("id")
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
@TableField("POSID")
|
@TableField("POSID")
|
||||||
private Integer posid;
|
private Integer posid;
|
||||||
|
|
||||||
@@ -76,9 +81,6 @@ public class ModCoilMap {
|
|||||||
@TableField("SETUP_MODE_DSC")
|
@TableField("SETUP_MODE_DSC")
|
||||||
private String setupModeDsc;
|
private String setupModeDsc;
|
||||||
|
|
||||||
@TableField("STATUS")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@TableField("STATUS_MODE_DSC")
|
@TableField("STATUS_MODE_DSC")
|
||||||
private String statusModeDsc;
|
private String statusModeDsc;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.fizz.business.domain;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StdAlloy {
|
||||||
|
|
||||||
|
private Integer gradeid; // GRADEID
|
||||||
|
private String name; // NAME
|
||||||
|
private Integer origin; // ORIGIN
|
||||||
|
private Float sigma0; // SIGMA0
|
||||||
|
private Float firstSigma0; // FIRST_SIGMA0
|
||||||
|
private Float initSigma; // INIT_SIGMA
|
||||||
|
private Float ro; // RO
|
||||||
|
private Integer classId; // CLASSID
|
||||||
|
private Float a; // A
|
||||||
|
private Float b; // B
|
||||||
|
private Float c; // C
|
||||||
|
private Float d; // D
|
||||||
|
private Float kc0; // KC0
|
||||||
|
private Float kc1; // KC1
|
||||||
|
private Float kc2; // KC2
|
||||||
|
private Float kc3; // KC3
|
||||||
|
private Float kc4; // KC4
|
||||||
|
private Float nu; // NU
|
||||||
|
private Float e; // E
|
||||||
|
private Float chal; // CHAL
|
||||||
|
private Float temp0; // TEMP0
|
||||||
|
private Float strength; // STRENGTH
|
||||||
|
private Integer weldCode; // WELD_CODE
|
||||||
|
private LocalDateTime insDate; // INSDATE
|
||||||
|
|
||||||
|
}
|
||||||
@@ -36,4 +36,7 @@ public class WebOperateMatForm implements Serializable {
|
|||||||
@ApiModelProperty(value = "计划号")
|
@ApiModelProperty(value = "计划号")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "重量")
|
||||||
|
private Double weight;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,10 @@ package com.fizz.business.mapper;
|
|||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.fizz.business.domain.StdAlloy;
|
||||||
import com.fizz.business.domain.SteelGradeInfo;
|
import com.fizz.business.domain.SteelGradeInfo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SteelGradeInfoMapper extends BaseMapper<SteelGradeInfo> {
|
public interface SteelGradeInfoMapper extends BaseMapper<StdAlloy> {
|
||||||
}
|
}
|
||||||
@@ -80,11 +80,16 @@ public class RabbitQueueListener {
|
|||||||
|
|
||||||
ModSetupResultKeyVO modSetupResultKeyVO = new ModSetupResultKeyVO();
|
ModSetupResultKeyVO modSetupResultKeyVO = new ModSetupResultKeyVO();
|
||||||
modSetupResultKeyVO.setKey(ModSetupResultServiceImpl.WS_EKY);
|
modSetupResultKeyVO.setKey(ModSetupResultServiceImpl.WS_EKY);
|
||||||
|
modSetupResultKeyVO.setFlag(true);
|
||||||
modSetupResultKeyVO.setLists(setup);
|
modSetupResultKeyVO.setLists(setup);
|
||||||
//socket
|
//socket
|
||||||
WebSocketUtil.sendMessage(WsTypeEnum.calc_setup_result,JSONUtil.toJsonStr(modSetupResultKeyVO));
|
WebSocketUtil.sendMessage(WsTypeEnum.calc_setup_result,JSONUtil.toJsonStr(modSetupResultKeyVO));
|
||||||
} else if ("TOTAL_PRESET_FAILED".equalsIgnoreCase(messageId)) {
|
} else if ("TOTAL_PRESET_FAILED".equalsIgnoreCase(messageId)) {
|
||||||
WebSocketUtil.sendMessage(WsTypeEnum.calc_setup_result,JSONUtil.toJsonStr(Lists.newArrayList()));
|
|
||||||
|
ModSetupResultKeyVO modSetupResultKeyVO = new ModSetupResultKeyVO();
|
||||||
|
modSetupResultKeyVO.setKey(ModSetupResultServiceImpl.WS_EKY);
|
||||||
|
modSetupResultKeyVO.setFlag(false);
|
||||||
|
WebSocketUtil.sendMessage(WsTypeEnum.calc_setup_result,JSONUtil.toJsonStr(modSetupResultKeyVO));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,4 +29,6 @@ public interface CrmPdiPlanService extends IService<CrmPdiPlan> {
|
|||||||
String editCoilInfo(CrmPdiPlanForm coilid);
|
String editCoilInfo(CrmPdiPlanForm coilid);
|
||||||
|
|
||||||
String calcSetup(CalcPdiPlanForm coilid);
|
String calcSetup(CalcPdiPlanForm coilid);
|
||||||
|
|
||||||
|
CrmPdiPlan getOnlineCoil();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,5 +6,7 @@ import com.fizz.business.domain.ModCoilMap;
|
|||||||
public interface ModCoilMapService extends IService<ModCoilMap> {
|
public interface ModCoilMapService extends IService<ModCoilMap> {
|
||||||
void saveModCoilInfo(ModCoilMap modCoilMap);
|
void saveModCoilInfo(ModCoilMap modCoilMap);
|
||||||
|
|
||||||
|
void updateModCoil(String coilId);
|
||||||
|
|
||||||
// 你可以添加自定义的业务方法
|
// 你可以添加自定义的业务方法
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package com.fizz.business.service;
|
package com.fizz.business.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fizz.business.domain.StdAlloy;
|
||||||
import com.fizz.business.domain.SteelGradeInfo;
|
import com.fizz.business.domain.SteelGradeInfo;
|
||||||
|
|
||||||
public interface SteelGradeInfoService extends IService<SteelGradeInfo> {
|
public interface SteelGradeInfoService extends IService<StdAlloy> {
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fizz.business.domain.CrmPdiPlan;
|
import com.fizz.business.domain.CrmPdiPlan;
|
||||||
import com.fizz.business.domain.ModCoilMap;
|
import com.fizz.business.domain.ModCoilMap;
|
||||||
|
import com.fizz.business.domain.ProMatmap;
|
||||||
import com.fizz.business.form.*;
|
import com.fizz.business.form.*;
|
||||||
import com.fizz.business.mapper.CrmPdiPlanMapper;
|
import com.fizz.business.mapper.CrmPdiPlanMapper;
|
||||||
import com.fizz.business.service.CrmPdiPlanService;
|
import com.fizz.business.service.CrmPdiPlanService;
|
||||||
@@ -20,6 +21,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@@ -46,17 +48,26 @@ public class CrmPdiPlanServiceImpl extends ServiceImpl<CrmPdiPlanMapper, CrmPdiP
|
|||||||
public CrmPdiPlanVO getByCoilIdAndOperId(String coilid) {
|
public CrmPdiPlanVO getByCoilIdAndOperId(String coilid) {
|
||||||
|
|
||||||
QueryWrapper<CrmPdiPlan> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<CrmPdiPlan> queryWrapper = new QueryWrapper<>();
|
||||||
if (coilid.equals("ONLINE")) {
|
if (coilid.equalsIgnoreCase("ONLINE")) {
|
||||||
queryWrapper.eq("STATUS", coilid);
|
queryWrapper.eq("STATUS", coilid);
|
||||||
CrmPdiPlan one = this.getOne(queryWrapper);
|
CrmPdiPlan one = this.getOne(queryWrapper);
|
||||||
return BeanUtil.copyProperties(one, CrmPdiPlanVO.class);
|
return BeanUtil.copyProperties(one, CrmPdiPlanVO.class);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
queryWrapper.like("coilid", coilid);
|
||||||
|
CrmPdiPlan one = this.getOne(queryWrapper);
|
||||||
|
|
||||||
|
return BeanUtil.copyProperties(one, CrmPdiPlanVO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
queryWrapper.like("coilid", coilid);
|
}
|
||||||
CrmPdiPlan one = this.getOne(queryWrapper);
|
|
||||||
|
|
||||||
return BeanUtil.copyProperties(one, CrmPdiPlanVO.class);
|
private CrmPdiPlan getByCoilId(String coilid) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<CrmPdiPlan> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(CrmPdiPlan::getCoilid,coilid);
|
||||||
|
|
||||||
|
return this.baseMapper.selectOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -112,30 +123,47 @@ public class CrmPdiPlanServiceImpl extends ServiceImpl<CrmPdiPlanMapper, CrmPdiP
|
|||||||
QueryWrapper<CrmPdiPlan> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<CrmPdiPlan> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.in("STATUS", "NEW", "READY");
|
queryWrapper.in("STATUS", "NEW", "READY");
|
||||||
|
|
||||||
return BeanUtil.copyToList(this.list(), CrmPdiPlanVO.class);
|
return BeanUtil.copyToList(this.list(queryWrapper), CrmPdiPlanVO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCrmPdiPlanById(ChangePlanStatusForm form) {
|
public void updateCrmPdiPlanById(ChangePlanStatusForm form) {
|
||||||
|
|
||||||
if (StringUtils.compare(form.getOperation(), "ONLINE") == 0) {
|
|
||||||
log.info("上线时通知通讯程序下发设定到L1,matId: {}", form.getCoilId());
|
|
||||||
modSetupResultService.retrySetup(form.getCoilId());
|
|
||||||
}
|
|
||||||
|
|
||||||
CrmPdiPlan crmPdiPlan = this.getById(form.getId());
|
CrmPdiPlan crmPdiPlan = this.getById(form.getId());
|
||||||
|
|
||||||
crmPdiPlan.setStatus(form.getOperation());
|
if (StringUtils.compare(form.getOperation(), "ONLINE") == 0 && StringUtils.compare(form.getOperation(), "PRODUCT") != 0) {
|
||||||
|
crmPdiPlan.setStatus("READY");
|
||||||
|
this.updateById(crmPdiPlan);
|
||||||
|
log.info("退回钢卷,matId: {}", form.getCoilId());
|
||||||
|
this.updateById(crmPdiPlan);
|
||||||
|
}
|
||||||
|
|
||||||
this.updateById(crmPdiPlan);
|
|
||||||
|
if (StringUtils.compare(form.getOperation(), "ONLINE") == 0 && StringUtils.compare(form.getOperation(), "PRODUCT") != 0) {
|
||||||
|
|
||||||
|
crmPdiPlan.setStatus(form.getOperation());
|
||||||
|
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
crmPdiPlan.setOnlineTime(now);
|
||||||
|
crmPdiPlan.setStartDate(now);
|
||||||
|
this.updateById(crmPdiPlan);
|
||||||
|
log.info("上线时通知通讯程序下发设定到L1,matId: {}", form.getCoilId());
|
||||||
|
modSetupResultService.retrySetup(form.getCoilId());
|
||||||
|
|
||||||
|
ModCoilMap bean = BeanUtil.toBean(crmPdiPlan, ModCoilMap.class);
|
||||||
|
modCoilMapService.saveModCoilInfo(bean);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.compare(form.getOperation(), "PRODUCT") == 0) {
|
||||||
|
|
||||||
|
modCoilMapService.updateModCoil(form.getCoilId());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
proMatmapService.updateMatid(form.getCoilId());
|
proMatmapService.updateMatid(form.getCoilId());
|
||||||
|
|
||||||
|
|
||||||
ModCoilMap bean = BeanUtil.toBean(crmPdiPlan, ModCoilMap.class);
|
|
||||||
modCoilMapService.saveModCoilInfo(bean);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -172,6 +200,8 @@ public class CrmPdiPlanServiceImpl extends ServiceImpl<CrmPdiPlanMapper, CrmPdiP
|
|||||||
|
|
||||||
calcPdiPlanForm.setGrade(coilid.getGrade());
|
calcPdiPlanForm.setGrade(coilid.getGrade());
|
||||||
calcPdiPlanForm.setOperid(coilid.getOperid());
|
calcPdiPlanForm.setOperid(coilid.getOperid());
|
||||||
|
calcPdiPlanForm.setCoilid(coilid.getCoilid());
|
||||||
|
calcPdiPlanForm.setHotCoilid(coilid.getHotCoilid());
|
||||||
calcPdiPlanForm.setAnnealThick(coilid.getAnnealThick());
|
calcPdiPlanForm.setAnnealThick(coilid.getAnnealThick());
|
||||||
calcPdiPlanForm.setEntryWidth(coilid.getEntryWidth());
|
calcPdiPlanForm.setEntryWidth(coilid.getEntryWidth());
|
||||||
calcPdiPlanForm.setExitThick(coilid.getExitThick());
|
calcPdiPlanForm.setExitThick(coilid.getExitThick());
|
||||||
@@ -190,4 +220,24 @@ public class CrmPdiPlanServiceImpl extends ServiceImpl<CrmPdiPlanMapper, CrmPdiP
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CrmPdiPlan getOnlineCoil() {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<ProMatmap> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ProMatmap::getL1mapidx,0);
|
||||||
|
|
||||||
|
ProMatmap one = proMatmapService.getOne(queryWrapper);
|
||||||
|
|
||||||
|
if (one == null){
|
||||||
|
|
||||||
|
return new CrmPdiPlan();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CrmPdiPlan byCoilId = getByCoilId(one.getMatid());
|
||||||
|
|
||||||
|
|
||||||
|
return byCoilId;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class CrmPdoExcoilServiceImpl extends ServiceImpl<CrmPdoExcoilMapper, Crm
|
|||||||
*/
|
*/
|
||||||
public CrmPdoExcoil getByExcoilIdAndOperId(String excoilid, Integer operid) {
|
public CrmPdoExcoil getByExcoilIdAndOperId(String excoilid, Integer operid) {
|
||||||
QueryWrapper<CrmPdoExcoil> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<CrmPdoExcoil> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("excoilid", excoilid).eq("operid", operid);
|
queryWrapper.eq("exit_coilid", excoilid).eq("operid", operid);
|
||||||
return this.getOne(queryWrapper);
|
return this.getOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ public class CrmPdoExcoilServiceImpl extends ServiceImpl<CrmPdoExcoilMapper, Crm
|
|||||||
*/
|
*/
|
||||||
public boolean deleteCrmPdoExcoil(String excoilid, Integer operid) {
|
public boolean deleteCrmPdoExcoil(String excoilid, Integer operid) {
|
||||||
QueryWrapper<CrmPdoExcoil> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<CrmPdoExcoil> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("excoilid", excoilid).eq("operid", operid);
|
queryWrapper.eq("exit_coilid", excoilid).eq("operid", operid);
|
||||||
return this.remove(queryWrapper);
|
return this.remove(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.fizz.business.service.impl;
|
package com.fizz.business.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fizz.business.domain.ModCoilMap;
|
import com.fizz.business.domain.ModCoilMap;
|
||||||
import com.fizz.business.mapper.ModCoilMapMapper;
|
import com.fizz.business.mapper.ModCoilMapMapper;
|
||||||
@@ -18,4 +19,24 @@ public class ModCoilMapServiceImpl extends ServiceImpl<ModCoilMapMapper, ModCoil
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateModCoil(String coilId) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<ModCoilMap> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
queryWrapper.eq(ModCoilMap::getCoilid,coilId);
|
||||||
|
|
||||||
|
ModCoilMap coilMap = this.baseMapper.selectOne(queryWrapper);
|
||||||
|
|
||||||
|
if (coilMap == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
coilMap.setPosid(0);
|
||||||
|
|
||||||
|
this.baseMapper.updateById(coilMap);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ public class ModSetupResultServiceImpl extends ServiceImpl<ModSetupResultMapper,
|
|||||||
//发送MQ
|
//发送MQ
|
||||||
MessageProperties props = MessagePropertiesBuilder.newInstance()
|
MessageProperties props = MessagePropertiesBuilder.newInstance()
|
||||||
.setContentType(MessageProperties.CONTENT_TYPE_TEXT_PLAIN)
|
.setContentType(MessageProperties.CONTENT_TYPE_TEXT_PLAIN)
|
||||||
.setMessageId("CALL_SETUP")
|
.setMessageId("CALL_SETUP_BY_COILID")
|
||||||
.build();
|
.build();
|
||||||
rabbitTemplate.send(CommonConstants.RabbitMQ.SEND_MODEL,new Message(coilid.getBytes(StandardCharsets.UTF_8),props));
|
rabbitTemplate.send(CommonConstants.RabbitMQ.SEND_MODEL,new Message(coilid.getBytes(StandardCharsets.UTF_8),props));
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.fizz.business.service.impl;
|
package com.fizz.business.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fizz.business.domain.SteelGradeInfo;
|
import com.fizz.business.domain.StdAlloy;
|
||||||
import com.fizz.business.mapper.SteelGradeInfoMapper;
|
import com.fizz.business.mapper.SteelGradeInfoMapper;
|
||||||
import com.fizz.business.service.SteelGradeInfoService;
|
import com.fizz.business.service.SteelGradeInfoService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SteelGradeInfoServiceImpl extends ServiceImpl<SteelGradeInfoMapper, SteelGradeInfo> implements SteelGradeInfoService {
|
public class SteelGradeInfoServiceImpl extends ServiceImpl<SteelGradeInfoMapper, StdAlloy> implements SteelGradeInfoService {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.fizz.business.domain.CrmPdiPlan;
|
import com.fizz.business.domain.CrmPdiPlan;
|
||||||
import com.fizz.business.domain.CrmPdoExcoil;
|
import com.fizz.business.domain.CrmPdoExcoil;
|
||||||
|
import com.fizz.business.domain.ProMatmap;
|
||||||
import com.fizz.business.form.WebOperateMatForm;
|
import com.fizz.business.form.WebOperateMatForm;
|
||||||
import com.fizz.business.mapper.CrmPdiPlanMapper;
|
import com.fizz.business.mapper.CrmPdiPlanMapper;
|
||||||
import com.fizz.business.service.CrmPdoExcoilService;
|
import com.fizz.business.service.CrmPdoExcoilService;
|
||||||
|
import com.fizz.business.service.ProMatmapService;
|
||||||
import com.fizz.business.service.TrackService;
|
import com.fizz.business.service.TrackService;
|
||||||
import com.fizz.business.utils.CalcUtil;
|
import com.fizz.business.utils.CalcUtil;
|
||||||
import com.fizz.business.vo.Plan2PdoVO;
|
import com.fizz.business.vo.Plan2PdoVO;
|
||||||
@@ -15,7 +17,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,6 +31,9 @@ public class TrackServiceImpl implements TrackService {
|
|||||||
@Resource
|
@Resource
|
||||||
CrmPdiPlanMapper crmPdiPlanMapper;
|
CrmPdiPlanMapper crmPdiPlanMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ProMatmapService proMatmapService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
CrmPdoExcoilService crmPdoExcoilService;
|
CrmPdoExcoilService crmPdoExcoilService;
|
||||||
|
|
||||||
@@ -48,22 +53,37 @@ public class TrackServiceImpl implements TrackService {
|
|||||||
this.operateMatWeb(form);
|
this.operateMatWeb(form);
|
||||||
|
|
||||||
CrmPdiPlan pdiPlan = crmPdiPlanMapper.selectById(form.getId());
|
CrmPdiPlan pdiPlan = crmPdiPlanMapper.selectById(form.getId());
|
||||||
|
pdiPlan.setEndDate(LocalDateTime.now());
|
||||||
|
|
||||||
|
pdiPlan.setStatus("PRODUCT");
|
||||||
|
crmPdiPlanMapper.updateById(pdiPlan);
|
||||||
|
|
||||||
Plan2PdoVO bean = BeanUtil.toBean(pdiPlan, Plan2PdoVO.class);
|
Plan2PdoVO bean = BeanUtil.toBean(pdiPlan, Plan2PdoVO.class);
|
||||||
|
|
||||||
CrmPdoExcoil excoil = BeanUtil.toBean(bean, CrmPdoExcoil.class);
|
CrmPdoExcoil excoil = BeanUtil.toBean(bean, CrmPdoExcoil.class);
|
||||||
|
|
||||||
double calcCoilWeight = CalcUtil.calcCoilWeight(excoil.getExitLength(), excoil.getEntryThick(), excoil.getEntryWidth());
|
CrmPdoExcoil operId = crmPdoExcoilService.getByExcoilIdAndOperId(excoil.getExitCoilid(), excoil.getOperid());
|
||||||
excoil.setEncoilid(bean.getCoilid());
|
|
||||||
excoil.setExitCoilid(bean.getCoilid());
|
|
||||||
excoil.setCalcExitWeight(calcCoilWeight);
|
|
||||||
excoil.setMeasExitWeight(calcCoilWeight);
|
|
||||||
excoil.setHeadpos(0d);
|
|
||||||
excoil.setTailpos(excoil.getExitLength());
|
|
||||||
excoil.setSubid(1);
|
|
||||||
excoil.setOuterDiameter(Double.valueOf(bean.getEntryOuterDiameter()));
|
|
||||||
excoil.setStatus("PRODUCT");
|
|
||||||
|
|
||||||
crmPdoExcoilService.addCrmPdoExcoil(excoil);
|
if (operId == null){
|
||||||
|
double calcCoilWeight = CalcUtil.calcCoilWeight(excoil.getExitLength(), excoil.getEntryThick(), excoil.getEntryWidth());
|
||||||
|
excoil.setEncoilid(bean.getCoilid());
|
||||||
|
excoil.setExitCoilid(bean.getCoilid());
|
||||||
|
excoil.setCalcExitWeight(calcCoilWeight);
|
||||||
|
excoil.setMeasExitWeight(calcCoilWeight);
|
||||||
|
excoil.setHeadpos(0d);
|
||||||
|
excoil.setTailpos(excoil.getExitLength());
|
||||||
|
excoil.setSubid(1);
|
||||||
|
excoil.setOuterDiameter(Double.valueOf(bean.getEntryOuterDiameter()));
|
||||||
|
excoil.setStatus("PRODUCT");
|
||||||
|
excoil.setOnlineDate(pdiPlan.getOnlineTime());
|
||||||
|
excoil.setStartDate(pdiPlan.getStartDate());
|
||||||
|
excoil.setEndDate(pdiPlan.getEndDate());
|
||||||
|
|
||||||
|
crmPdoExcoilService.addCrmPdoExcoil(excoil);
|
||||||
|
|
||||||
|
proMatmapService.updateMatid("");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public class ModSetupResultKeyVO {
|
|||||||
|
|
||||||
String key;
|
String key;
|
||||||
|
|
||||||
|
boolean flag;
|
||||||
|
|
||||||
List<ModSetupResultVO> lists;
|
List<ModSetupResultVO> lists;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
12
business/src/main/java/com/fizz/business/vo/StdAlloyVO.java
Normal file
12
business/src/main/java/com/fizz/business/vo/StdAlloyVO.java
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package com.fizz.business.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StdAlloyVO {
|
||||||
|
|
||||||
|
private Integer gradeid; // GRADEID
|
||||||
|
private String name; // NAME
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,9 +7,11 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://47.109.139.82:3306/ngcrm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/ngcrm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: ngcrm
|
# url: jdbc:mysql://192.160.155.0:3306/ngcrm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
password: ngcrm
|
username: root
|
||||||
|
password: root*-2024
|
||||||
|
# password: root
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|||||||
Reference in New Issue
Block a user