Commit 5226cd48 authored by 李驰骋's avatar 李驰骋

排产相关调整

parent f4a5606a
......@@ -87,27 +87,6 @@ public class BaseController {
return rspData;
}
// 手动分页 manualPagination
protected static <T> TableDataInfo<T> getManualDataTable(final List<T> list) {
final PaginationHelper<T> paginator = new PaginationHelper<>(list);
List<T> page = new ArrayList<>();
final PageDomain pageDomain = TableSupport.buildPageRequest();
final Integer pageNum = pageDomain.getPageNum();
final Integer pageSize = pageDomain.getPageSize();
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
paginator.setPageSize(pageSize);
page = paginator.getPage(pageNum);
} else {
paginator.setPageSize(10);
page = paginator.getPage(1);
}
final TableDataInfo<T> rspData = new TableDataInfo<>(page, new PageInfo<>(list).getTotal());
rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功");
return rspData;
}
/**
* 返回成功
*/
......
......@@ -54,8 +54,9 @@ public class CalWorkunitController extends BaseController {
// @PreAuthorize("@ss.hasPermi('md:workunit:list')")
@GetMapping("/unSelectList")
public TableDataInfo unSelectList(CalWorkunit calWorkunit) {
startPage();
List<MdWorkunit> list = calWorkunitService.selectUnSelectList(calWorkunit);
return getManualDataTable(list);
return getDataTable(list);
}
@GetMapping("/calWorkunitList")
......
......@@ -58,10 +58,6 @@ public class MdWorkunitWorkerController extends BaseController {
List<MdWorkunitWorker> list = mdWorkunitWorkerService.selectMdWorkunitWorkerList(mdWorkunitWorker);
return getDataTable(list);
}
///{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
/**
* 查询工作单元列表
*/
......@@ -69,11 +65,12 @@ public class MdWorkunitWorkerController extends BaseController {
@PreAuthorize("@ss.hasPermi('md:workunit:list')")
@GetMapping("/listByUser")
public TableDataInfo list(MdWorkunit mdWorkunit) {
startPage();
List<MdWorkunitVo> list = mdWorkunitService.selectMdWorkunitList(mdWorkunit);
Set<Long> workunitIds = mdWorkunitWorkerMapper.selectListByQw(new QueryWrapper<MdWorkunitWorker>().eq("user_id", mdWorkunit.getUserId())).stream().map(MdWorkunitWorker::getWorkunitId).filter(Objects::nonNull).collect(Collectors.toSet());
List<MdWorkunitVo> collect = list.stream().filter(x -> !workunitIds.contains(x.getWorkunitId())).collect(Collectors.toList());
return getManualDataTable(collect);
return getDataTable(collect);
}
/**
......
......@@ -75,8 +75,9 @@ public class ProArrangeController extends BaseController {
@PreAuthorize("@ss.hasPermi('pro:arrange:distinctList')")
@PostMapping("/distinctList")
public TableDataInfo<ProArrange> distinctList(ProArrangeQuery proArrange) {
startPage();
List<ProArrange> list = proArrangeService.selectDistictArrangeList(proArrange);
return getManualDataTable(list);
return getDataTable(list);
}
/**
......
......@@ -63,6 +63,7 @@ public class ProFeedbackController extends BaseController {
*/
@GetMapping("/list")
public TableDataInfo<ProFeedbackVo> list(ProFeedback proFeedback) {
startPage();
QueryWrapper<ProFeedback> query = new QueryWrapper<>();
query.eq(StringUtils.isNotEmpty(proFeedback.getFeedbackType()), "f.feedback_type", proFeedback.getFeedbackType());
query.eq(StringUtils.isNotEmpty(proFeedback.getStatus()), "f.status", proFeedback.getStatus());
......@@ -105,7 +106,7 @@ public class ProFeedbackController extends BaseController {
}
}
return getManualDataTable(proFeedbackVoList);
return getDataTable(proFeedbackVoList);
}
/**
......
......@@ -115,9 +115,10 @@ public class ProTaskMobController extends BaseController {
@ApiOperation("查询状态未完成的生产任务接口")
@GetMapping("/getTaskList")
public TableDataInfo<ProTask> list(ProTaskQuery proTask) {
startPage();
List<ProTask> rst = proTaskService.getTaskList(proTask);
return getManualDataTable(rst);
return getDataTable(rst);
}
/**
......
......@@ -97,8 +97,9 @@ public class ProWorkorderController extends BaseController {
@ApiOperation("工单查询")
@GetMapping("/list")
public TableDataInfo<ProWorkorder> list(ProWorkorderQuery proWorkorder) {
startPage();
List<ProWorkorder> list = proWorkorderService.selectProWorkorderList(proWorkorder);
return getManualDataTable(list);
return getDataTable(list);
}
/**
......@@ -107,6 +108,7 @@ public class ProWorkorderController extends BaseController {
@ApiOperation("查询待排产生产工单列表")
@GetMapping("/scheduleList")
public TableDataInfo<ProWorkorder> scheduleList(ProWorkorderQuery proWorkorder) {
startPage();
QueryWrapper<ProWorkorder> query = new QueryWrapper<>();
query.like(StringUtils.isNotEmpty(proWorkorder.getWorkorderCode()), "t1.workorder_code",
proWorkorder.getWorkorderCode());
......@@ -120,7 +122,7 @@ public class ProWorkorderController extends BaseController {
new String[]{WorkorderStatusEnum.PREPARE.getValue(), WorkorderStatusEnum.PUBLISHED.getValue()});
query.gt("t1.quantity-t1.quantity_scheduled", 0);
List<ProWorkorder> list = proWorkorderService.selectListByQw(query);
return getManualDataTable(list);
return getDataTable(list);
}
......@@ -238,6 +240,8 @@ public class ProWorkorderController extends BaseController {
/**
* 新增生产工单
*/
@ApiOperation("生产工单新增")
@PreAuthorize("@ss.hasPermi('mes:pro:workorder:add')")
@Log(title = "生产工单", businessType = BusinessType.INSERT)
@PostMapping
......@@ -274,6 +278,7 @@ public class ProWorkorderController extends BaseController {
/**
* 修改生产工单
*/
@ApiOperation("生产工单修改")
@PreAuthorize("@ss.hasPermi('mes:pro:workorder:edit')")
@Log(title = "生产工单", businessType = BusinessType.UPDATE)
@PutMapping
......@@ -418,7 +423,6 @@ public class ProWorkorderController extends BaseController {
}
@ApiOperation("打样生产工单任务生成")
@PostMapping(value = "/proofMakeProduction")
public AjaxResult proofMakeProduction(@RequestBody WorkorderProofMakeProduction production) {
proWorkorderService.proofMakeProduction(production);
......
......@@ -38,8 +38,9 @@ public class ProTaskWorkunitController extends BaseController {
@PreAuthorize("@ss.hasPermi('mes:pro:taskWorkunit:list')")
@PostMapping("/list")
public TableDataInfo<ProTaskWorkunit> list(@RequestBody ProTaskWorkunitQuery proTaskWorkunit) {
startPage();
List<ProTaskWorkunit> lists = proTaskWorkunitService.schedulingList(proTaskWorkunit);
return getManualDataTable(lists);
return getDataTable(lists);
}
@ApiOperation("查询任务工作单元列表")
......
......@@ -174,5 +174,9 @@ public class ProTaskWorkunit extends BaseEntity {
@ApiModelProperty("编排单号")
private String arrangeCode;
@TableField(exist = false)
@ApiModelProperty("工单编号")
private String workorderCode;
private int percent;
}
......@@ -142,15 +142,17 @@ public interface ProTaskWorkunitMapper {
"\t, t.workstation_id, t.workstation_code, ws.workstation_name\n" +
"\t, t.process_id, t.process_code, t.process_name\n" +
"\t, t.item_id, t.item_code, t.item_name, t.specification, t.unit_of_measure\n" +
"\t, ptw.task_workunit_id, ptw.quantity, t.quantity_wait, ptw.quantity_produced, ptw.quantity_changed\n" +
"\t, ptw.task_workunit_id, ptw.quantity, ptw.create_by, t.quantity_wait, ptw.quantity_produced, ptw.quantity_changed\n" +
"\t, t.client_id, t.client_code, t.client_name, t.client_nick, t.is_last_process, ptw.schedule_start_date\n" +
"\t, t.duration, ptw.schedule_end_date, t.color_code, t.request_date\n" +
"\t, t.attr1, t.attr2, t.attr3, t.attr4, t.create_by\n" +
"\t, t.attr1, t.attr2, t.attr3, t.attr4\n" +
"\t, t.create_time, t.update_by, t.update_time, ptw.STATUS, ptw.quantity_qualify, ptw.remark\n" +
"\t, ptw.quantity_unqualify, mw.workunit_id, mw.workunit_code, mw.workunit_name, t.arrange_code\n" +
"\t, ptw.quantity_unqualify, mw.workunit_id, mw.workunit_code, mw.workunit_name, wo.workorder_code\n" +
"\t, (case ptw.STATUS when 'BEGINNING' then 1 when 'PREPARE' then 2 when 'PAUSE' then 3 when 'ERROR_STOP' then 4 end) statusIndex\n" +
"from pro_task_workunit ptw\n" +
"\tleft join pro_task t on ptw.task_id = t.task_id\n" +
"\tleft join pro_task_workorder tw on t.task_id = tw.task_id\n" +
"\tleft join pro_workorder wo on wo.workorder_id = tw.workorder_id\n" +
"\tleft join pro_process p on t.process_id = p.process_id\n" +
"\tleft join md_workunit mw on ptw.workunit_id = mw.workunit_id\n" +
"\tleft join md_workstation ws on mw.workstation_id = ws.workstation_id\n" +
......
......@@ -144,16 +144,6 @@ public class Task {
*/
private ScheduleStatus scheduleStatus;
/*
* 工序要求设备功能点
*/
private ProcessFunction processFunction=new ProcessFunction();
/**
* 工序要求加工属性
*/
private ProcessRequestAttribute processRequestAttribute = new ProcessRequestAttribute();
/*
* 作业日历
*/
......@@ -256,14 +246,6 @@ public class Task {
private String printingMethod;
}
public void initProcessAttribute(ProProductionSolutionSpecificationSheet specificationSheet){
BeanUtil.copyProperties(specificationSheet, this.getProcessRequestAttribute());
}
public void initProcessFunction(ProProductionSolutionProcess proProductionSolutionProcess){
BeanUtil.copyProperties(proProductionSolutionProcess, this.getProcessFunction());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
......
......@@ -135,14 +135,6 @@ public class AlgorithmDataSourceImpl implements AlgorithmDataSource {
if(productionSolution==null){
throw new ServiceException(String.format("生产工单:%s生产版本未找到", firstWorkorder.getWorkorderCode()));
}
//查询对应生产版本工序
QueryWrapper<ProProductionSolutionProcess> processQuery2 = new QueryWrapper<>();
processQuery2.eq("production_solution_id", productionSolution.getProductionSolutionId());
List<ProProductionSolutionProcess> solutionProcesses = proProductionSolutionProcessService.selectProProductionSolutionProcessList(processQuery2);
Map<Long, ProProductionSolutionProcess> solutionProcesseMap = solutionProcesses.stream().collect(Collectors.toMap(s->s.getProcessId(),s->s));
//查询对应生产版本规格说明书
ProProductionSolutionSpecificationSheet specificationSheet = proProductionSolutionSpecificationSheetService.selectSpecificationSheetByProductionSolutionId(productionSolution.getProductionSolutionId());
// 工序分组 生成Job及Task
Job job = new Job(scheduleJobGroup.getWorkorderCode(), Duration.between(schedulingStartedDate, DateUtil.date(scheduleJobGroup.getDemandDate()).toLocalDateTime())) {{
setFixed(false);
......@@ -189,8 +181,6 @@ public class AlgorithmDataSourceImpl implements AlgorithmDataSource {
task.setSetupTime(Duration.ofNanos(routingItem.getLineBreakTime().multiply(BigDecimal.valueOf(unitMultiple)).longValue()));
}
task.getTaskData().put("SeqNo", routingItem.getProcessRef());
task.initProcessAttribute(specificationSheet);
task.initProcessFunction(solutionProcesseMap.get(routingItem.getProcessId()));
job.getTasks().add(task);
i++;
}
......
......@@ -151,126 +151,13 @@ public class EquipmentSelectionStrategyImpl implements EquipmentSelectionStrateg
}
/**
* TODO
* 完全匹配工序设备选择
* @param task
* @param equipments
* @return
*/
private List<Equipment> matchEquipment(Task task, List<Equipment> equipments) {
List<Equipment> rst = new ArrayList<>();
for(Equipment equ : equipments){
Equipment.EquipmentAttribute equipmentAttribute = equ.getEquipmentAttribute();
//如果工序存在匹配规则,需匹配相应设备
Task.ProcessRequestAttribute processRequestAttribute = task.getProcessRequestAttribute();
//厚度
if(processRequestAttribute.getThick()!=null&&processRequestAttribute.getThick().compareTo(BigDecimal.ZERO)!=0){
if(equipmentAttribute.getTreatingThicknessMin()!=null&&
equipmentAttribute.getTreatingThicknessMin().compareTo(processRequestAttribute.getThick())>0){
continue;
}
if(equipmentAttribute.getTreatingThicknessMax()!=null&&
equipmentAttribute.getTreatingThicknessMax().compareTo(processRequestAttribute.getThick())<0){
continue;
}
}
//宽度
if(processRequestAttribute.getPrintingWidth()!=null&&
processRequestAttribute.getPrintingWidth().compareTo(BigDecimal.ZERO)!=0){
if(equipmentAttribute.getTreatingWidthMin()!=null&&
equipmentAttribute.getTreatingWidthMin().compareTo(processRequestAttribute.getPrintingWidth())>0){
continue;
}
if(equipmentAttribute.getTreatingWidthMax()!=null&&
equipmentAttribute.getTreatingWidthMax().compareTo(processRequestAttribute.getPrintingWidth())<0){
continue;
}
}
//油槽数
if(processRequestAttribute.getDieSunkOffsetOilTankNum()!=null&&
processRequestAttribute.getDieSunkOffsetOilTankNum().compareTo(BigDecimal.ZERO)!=0){
if(equipmentAttribute.getDieSunkOffsetOilTankNum()!=null&&
equipmentAttribute.getDieSunkOffsetOilTankNum().compareTo(processRequestAttribute.getDieSunkOffsetOilTankNum())<0){
continue;
}
}
//印刷方式
if(StringUtils.isNotEmpty(processRequestAttribute.getPrintingMethod())){
if("双面印刷".equals(processRequestAttribute.getPrintingMethod())){
if(StringUtils.isNotEmpty(equipmentAttribute.getPrintingMethod()) &&
!processRequestAttribute.getPrintingMethod().equals(equipmentAttribute.getPrintingMethod())){
continue;
}
}
}
//设备功能点,需满足工序所属功能点
if(!this.equipmentFunctionMatch(task.getProcessFunction(), equ.getEquipmentFunction())){
continue;
}
rst.add(equ);
}
return rst;
}
//判断设备是否满足工序功能点要求
private boolean equipmentFunctionMatch(Task.ProcessFunction processFunction,
Equipment.EquipmentFunction equipmentFunction){
if("Y".equalsIgnoreCase(processFunction.getSacmForEdgeOpening())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForEdgeOpening())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForPasteComposite())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForPasteComposite())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForThermalComposite())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForThermalComposite())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForLabeling())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForLabeling())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForBuckleUp())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForBuckleUp())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForCreasing())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForCreasing())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForOrgan())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForOrgan())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForThermalCutting())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForThermalCutting())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForThermalSelfFusion())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForThermalSelfFusion())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForMolarTooth())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForMolarTooth())){
return false;
}
}
if("Y".equalsIgnoreCase(processFunction.getSacmForSlitting())){
if(!"Y".equalsIgnoreCase(equipmentFunction.getSacmForSlitting())){
return false;
}
}
return true;
return equipments;
}
}
......@@ -247,7 +247,7 @@ public class ProProductionSolutionServiceImpl implements IProProductionSolutionS
BeanUtils.copyProperties(proProductionSolutionProcessVo, proProductionSolutionProcess);
proProductionSolutionProcess.setSerial(k);
if (proProductionSolutionProcessVo.getQuantity() == null) {
proProductionSolutionProcess.setQuantity(new BigDecimal("1000.000"));
proProductionSolutionProcess.setQuantity(new BigDecimal("1"));
}
if (StringUtils.isEmpty(proProductionSolutionProcessVo.getUnitOfMeasure())) {
proProductionSolutionProcess.setUnitOfMeasure(proProductionSolutionVo.getUnitOfMeasure());
......
......@@ -391,6 +391,7 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
query.eq(proTaskWorkunit.getWorkCenterId() != null, "ws.workstation_id", proTaskWorkunit.getWorkCenterId());
query.eq(proTaskWorkunit.getWorkunitId() != null, "mw.workunit_id", proTaskWorkunit.getWorkunitId());
query.eq(proTaskWorkunit.getWorkshopId() != null, "ws.workshop_id", proTaskWorkunit.getWorkshopId());
query.like(StringUtils.isNotEmpty(proTaskWorkunit.getWorkorderCode()), "wo.workorder_code", proTaskWorkunit.getWorkorderCode());
query.like(StringUtils.isNotEmpty(proTaskWorkunit.getTaskCode()), "t.task_code", proTaskWorkunit.getTaskCode());
query.like(StringUtils.isNotEmpty(proTaskWorkunit.getWorkunitName()), "mw.workunit_name", proTaskWorkunit.getWorkunitName());
query.like(StringUtils.isNotEmpty(proTaskWorkunit.getItemName()), "t.item_name", proTaskWorkunit.getItemName());
......@@ -402,60 +403,6 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
query.eq(StringUtils.isNotEmpty(proTaskWorkunit.getArrangeCode()), "t.arrange_code", proTaskWorkunit.getArrangeCode());
query.orderByAsc("schedule_start_date");
List<ProTaskWorkunit> list = proTaskWorkunitService.selectTaskWorkUnitJoinTask(query);
if (CollectionUtil.isEmpty(list)) {
return list;
}
Set<String> arrangeSet = list.stream().map(ProTaskWorkunit::getArrangeCode).collect(Collectors.toSet());
QueryWrapper<ProArrange> proArrangeQueryWrapper = new QueryWrapper<>();
proArrangeQueryWrapper.in("arrange_code", arrangeSet);
List<ProArrange> proArranges = proArrangeMapper.selectListByQw(proArrangeQueryWrapper);
Set<String> createBySet = proArranges.stream().map(BaseEntity::getCreateBy).collect(Collectors.toSet());
QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
queryWrapper.in(CollectionUtil.isNotEmpty(createBySet), "user_name", createBySet);
List<SysUser> sysApiLogs = sysUserMapper.selectListByQw(queryWrapper);
Map<String, List<SysUser>> userMap = sysApiLogs.stream().collect(Collectors.groupingBy(SysUser::getUserName));
Map<String, List<ProArrange>> arrangeMap = proArranges.stream().collect(Collectors.groupingBy(ProArrange::getArrangeCode));
List<ProTaskWorkunit> objects = new ArrayList<>();
String workorderCode = proTaskWorkunit.getWorkorderCode();
String arrangeUsername = proTaskWorkunit.getArrangeUsername();
if (StringUtils.isNotEmpty(proTaskWorkunit.getArrangeUsername()) || StringUtils.isNotEmpty(workorderCode)) {
for (ProTaskWorkunit taskWorkunit : list) {
String arrangeCode = taskWorkunit.getArrangeCode();
List<ProArrange> proArranges1 = arrangeMap.get(arrangeCode);
if (proArranges1 != null && proArranges1.size() > 0) {
for (ProArrange proArrange : proArranges1) {
if (StringUtils.isNotEmpty(arrangeUsername) && StringUtils.isNotEmpty(workorderCode)) {
List<SysUser> sysUsers = userMap.get(proArrange.getCreateBy());
if (sysUsers.size() > 0) {
SysUser sysUser = sysUsers.get(0);
if (Objects.equals(proArrange.getArrangeCode(), proTaskWorkunit.getArrangeCode()) && arrangeUsername.toLowerCase().contains(sysUser.getNickName().toLowerCase())) {
objects.add(taskWorkunit);
}
}
} else if (StringUtils.isNotEmpty(arrangeUsername) && StringUtils.isEmpty(workorderCode)) {
List<SysUser> sysUsers = userMap.get(proArrange.getCreateBy());
if (sysUsers.size() > 0) {
SysUser sysUser = sysUsers.get(0);
if (arrangeUsername.toLowerCase().contains(sysUser.getNickName().toLowerCase())) {
objects.add(taskWorkunit);
}
}
} else if (StringUtils.isNotEmpty(workorderCode) && StringUtils.isEmpty(arrangeUsername)) {
if (Objects.equals(proArrange.getWorkorderCode(), workorderCode)) {
objects.add(taskWorkunit);
}
}
}
} else {
objects.add(taskWorkunit);
}
}
} else {
objects.addAll(list);
}
return objects;
}
}
......@@ -49,6 +49,7 @@ public class TmToolMachinesController extends BaseController {
@PreAuthorize("@ss.hasPermi('tm:tmToolMachines:list')")
@GetMapping("/warehouse/list")
public TableDataInfo warehouselist(TmToolMachines tmToolMachines) {
startPage();
List<TmToolMachines> collect = tmToolMachinesService.selectTmToolMachinesVoList(tmToolMachines);
List<TmToolMachines> list = collect.stream().filter(s -> StringUtils.isNotEmpty(s.getToolRequestUseId())).collect(Collectors.toList());
Set<String> objects = new HashSet<>();
......@@ -62,7 +63,7 @@ public class TmToolMachinesController extends BaseController {
}
}
}
return getManualDataTable(objects1);
return getDataTable(objects1);
}
......
......@@ -54,6 +54,7 @@ public class TmToolRequestController extends BaseController {
@PreAuthorize("@ss.hasPermi('tm:tmToolRequest:list')")
@GetMapping("/list/unused")
public TableDataInfo unUselist(TmToolRequest tmToolRequest) {
startPage();
List<TmToolRequest> list = tmToolRequestService.selectTmToolRequestList(tmToolRequest);
Set<Long> collect = list.stream().map(TmToolRequest::getToolRequestId).collect(Collectors.toSet());
Set<Long> set = tmToolRequestUseMapper.selectListByQw(new QueryWrapper<TmToolRequestUse>().in("tool_request_id", collect)).stream().map(TmToolRequestUse::getToolRequestId).collect(Collectors.toSet());
......@@ -63,7 +64,7 @@ public class TmToolRequestController extends BaseController {
objects.add(toolRequest);
}
}
return getManualDataTable(objects);
return getDataTable(objects);
}
/**
......
......@@ -19,6 +19,8 @@
<result property="quantityUnqualify" column="quantity_unqualify"/>
<result property="quantityChanged" column="quantity_changed"/>
<result property="status" column="status"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="remark" column="remark"/>
</resultMap>
......@@ -38,6 +40,8 @@
ptw.schedule_start_date,
ptw.schedule_end_date,
ptw.status,
ptw.create_by,
ptw.create_time,
ptw.remark
from pro_task_workunit ptw
left join md_workunit mw
......@@ -98,6 +102,8 @@
<if test="scheduleStartDate != null">schedule_start_date,</if>
<if test="scheduleEndDate != null">schedule_end_date,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if>
......@@ -113,6 +119,8 @@
<if test="scheduleStartDate != null">#{scheduleStartDate},</if>
<if test="scheduleEndDate != null">#{scheduleEndDate},</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
......@@ -133,6 +141,8 @@
<if test="scheduleStartDate != null">schedule_start_date = #{scheduleStartDate},</if>
<if test="scheduleEndDate != null">schedule_end_date = #{scheduleEndDate},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where task_workunit_id = #{taskWorkunitId}
</update>
......
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