更新计划项目名称
This commit is contained in:
		
							parent
							
								
									de462199de
								
							
						
					
					
						commit
						ee32488786
					
				@ -194,7 +194,6 @@ public class PlanDO extends BaseDO {
 | 
			
		||||
    @TableField(exist = false)
 | 
			
		||||
    private String customerName;
 | 
			
		||||
 | 
			
		||||
    @TableField(exist = false)
 | 
			
		||||
    private String projectName;
 | 
			
		||||
 | 
			
		||||
    @TableField(exist = false)
 | 
			
		||||
@ -228,6 +227,7 @@ public class PlanDO extends BaseDO {
 | 
			
		||||
    @TableField(exist = false)
 | 
			
		||||
    private LocalDateTime orderTime;
 | 
			
		||||
 | 
			
		||||
    private String code;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -202,6 +202,7 @@ public class PlanSubDO extends BaseDO {
 | 
			
		||||
    * */
 | 
			
		||||
    @TableField(exist = false)
 | 
			
		||||
    private String compositionName;
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    * 要求预计设计结束日期
 | 
			
		||||
 | 
			
		||||
@ -235,6 +235,8 @@ private TaskReportMapper taskReportMapper;
 | 
			
		||||
            last("LIMIT 1");
 | 
			
		||||
        }}
 | 
			
		||||
        );
 | 
			
		||||
        ProjectOrderDO projectOrderDO = projectOrderMapper.selectById(projectId);
 | 
			
		||||
 | 
			
		||||
        // 生成生产计划子项目信息
 | 
			
		||||
        List<ProjectOrderSubDO> projectOrderSubDOs = projectOrderService.getProjectOrderSubListByProjectOrderId(projectId);
 | 
			
		||||
        if(planDO != null){
 | 
			
		||||
@ -242,6 +244,8 @@ private TaskReportMapper taskReportMapper;
 | 
			
		||||
            planDO.setChangeNum(planDO.getChangeNum()+1);
 | 
			
		||||
            // 设置项目更新时间
 | 
			
		||||
            planDO.setChangeLastDate(LocalDateTime.now());
 | 
			
		||||
            planDO.setCode(projectOrderDO.getCode());
 | 
			
		||||
            planDO.setProjectName(projectOrderDO.getProjectName());
 | 
			
		||||
            // 取消设置生产计划状态
 | 
			
		||||
            // planDO.setStatus(ProjectPlanStatusEnum.CHANGE.getCode());
 | 
			
		||||
            planMapper.updateById(planDO);
 | 
			
		||||
@ -250,13 +254,13 @@ private TaskReportMapper taskReportMapper;
 | 
			
		||||
            pageReqVO.setPageNo(1);
 | 
			
		||||
            pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
 | 
			
		||||
            List<PlanSubDO> list =  planSubMapper.selectPage(pageReqVO).getList();
 | 
			
		||||
            ProjectOrderDO projectOrderDO = projectOrderMapper.selectById(projectId);
 | 
			
		||||
            CustomerDO customer = customerService.getCustomer(projectOrderDO.getCustomerId());
 | 
			
		||||
            for(ProjectOrderSubDO item : projectOrderSubDOs){
 | 
			
		||||
                if(!list.stream().anyMatch(a ->a.getProjectSubId().equals(item.getId()))) {
 | 
			
		||||
                    PlanSubDO planSubDO = new PlanSubDO();
 | 
			
		||||
                    planSubDO.setProjectPlanId(planDO.getId());
 | 
			
		||||
                    planSubDO.setProjectId(projectId);
 | 
			
		||||
                    planSubDO.setName(item.getName());
 | 
			
		||||
                    planSubDO.setProjectSubId(item.getId());
 | 
			
		||||
                    if(!StringUtils.isEmpty(item.getDeviceModel())){
 | 
			
		||||
                        planSubDO.setEquipId(Long.parseLong(item.getDeviceModel()));
 | 
			
		||||
@ -281,9 +285,10 @@ private TaskReportMapper taskReportMapper;
 | 
			
		||||
            planDO.setProjectId(projectId);
 | 
			
		||||
            // 设置项目更新次数
 | 
			
		||||
            planDO.setChangeNum(0);
 | 
			
		||||
            planDO.setCode(projectOrderDO.getCode());
 | 
			
		||||
            planDO.setProjectName(projectOrderDO.getProjectName());
 | 
			
		||||
            // 设置生产计划状态
 | 
			
		||||
            planDO.setStatus(ProjectPlanStatusEnum.START.getCode());
 | 
			
		||||
            ProjectOrderDO projectOrderDO = projectOrderMapper.selectById(projectId);
 | 
			
		||||
            CustomerDO customer = customerService.getCustomer(projectOrderDO.getCustomerId());
 | 
			
		||||
            // 月度流水号
 | 
			
		||||
//            SerialNumberDO serialNumberDO = new SerialNumberDO();
 | 
			
		||||
@ -306,6 +311,7 @@ private TaskReportMapper taskReportMapper;
 | 
			
		||||
                planSubDO.setProjectSubShortName(item.getNameSim());
 | 
			
		||||
                planSubDO.setProjectPlanId(planDO.getId());
 | 
			
		||||
                planSubDO.setProjectId(projectId);
 | 
			
		||||
                planSubDO.setName(item.getName());
 | 
			
		||||
                planSubDO.setProjectSubId(item.getId());
 | 
			
		||||
                if(!StringUtils.isEmpty(item.getDeviceModel())){
 | 
			
		||||
                    planSubDO.setEquipId(Long.parseLong(item.getDeviceModel()));
 | 
			
		||||
 | 
			
		||||
@ -121,7 +121,7 @@
 | 
			
		||||
          <td> 设备型号 </td>
 | 
			
		||||
          <td> 数量 </td>
 | 
			
		||||
          <td> 主要材料 </td>
 | 
			
		||||
          <td style="width:150px"> 毛坯日期 </td>
 | 
			
		||||
          <td style="width:160px"> 毛坯日期 </td>
 | 
			
		||||
          <td> 2D/日期 </td>
 | 
			
		||||
          <td> 3D/日期 </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
@ -325,12 +325,12 @@ style="
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td class="xh" style="width: 20%" > 序号 </td>
 | 
			
		||||
            <td class="xh" style="width:20%" > 序号 </td>
 | 
			
		||||
            <td colspan="3" style="width: 25%"> 名称/编号 </td>
 | 
			
		||||
            <td style="width: 10%"> 设备型号 </td>
 | 
			
		||||
            <td style="width: 10%"> 数量 </td>
 | 
			
		||||
            <td style="width: 10%"> 主要材料 </td>
 | 
			
		||||
            <td style="width: 15%"> 毛坯日期 </td>
 | 
			
		||||
            <td style="width: 10%"> 毛坯日期 </td>
 | 
			
		||||
            <td style="width: 10%"> 2D/日期 </td>
 | 
			
		||||
            <td style="width: 10%"> 3D/日期 </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
@ -536,7 +536,7 @@ const onPrint = () => {
 | 
			
		||||
      position: relative;
 | 
			
		||||
      font-size: 12px !important;
 | 
			
		||||
    }
 | 
			
		||||
    @media print and (-webkit-min-device-pixel-ratio: 0){
 | 
			
		||||
    @media print{
 | 
			
		||||
      .page {
 | 
			
		||||
        margin: 10mm;
 | 
			
		||||
        border: initial;
 | 
			
		||||
@ -547,15 +547,17 @@ const onPrint = () => {
 | 
			
		||||
        background: initial;
 | 
			
		||||
        page-break-after: always;
 | 
			
		||||
      }
 | 
			
		||||
      .footer {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    text-align: right;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* 注册页脚为运行元素 */
 | 
			
		||||
.footer {
 | 
			
		||||
  position: running(footer);
 | 
			
		||||
  text-align: right;
 | 
			
		||||
  font-size: 10px;
 | 
			
		||||
  color: #666;
 | 
			
		||||
  border-top: 1px dashed #ccc;
 | 
			
		||||
  padding-top: 2px;
 | 
			
		||||
  }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
        @page {
 | 
			
		||||
      size: A4;
 | 
			
		||||
      margin:0.8cm 1cm 1.4cm 1cm;;
 | 
			
		||||
@ -1006,7 +1008,14 @@ const resetForm = () => {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  font-size: 1px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.footer {
 | 
			
		||||
  position: running(footer);
 | 
			
		||||
  text-align: right;
 | 
			
		||||
  font-size: 10px;
 | 
			
		||||
  color: #666;
 | 
			
		||||
  border-top: 1px dashed #ccc;
 | 
			
		||||
  padding-top: 5px;
 | 
			
		||||
}
 | 
			
		||||
@page {
 | 
			
		||||
  size: A4;
 | 
			
		||||
  margin: 0;
 | 
			
		||||
@ -1015,7 +1024,7 @@ const resetForm = () => {
 | 
			
		||||
    font-family: Arial;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@media print and (-webkit-min-device-pixel-ratio: 0) {
 | 
			
		||||
@media print {
 | 
			
		||||
  .page {
 | 
			
		||||
    margin: 0;
 | 
			
		||||
    border: initial;
 | 
			
		||||
@ -1026,18 +1035,10 @@ const resetForm = () => {
 | 
			
		||||
    background: initial;
 | 
			
		||||
    page-break-after: always;
 | 
			
		||||
  }
 | 
			
		||||
  .footer {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    text-align: right;
 | 
			
		||||
    font-size: 10px;
 | 
			
		||||
    color: #666;
 | 
			
		||||
    border-top: 1px dashed #ccc;
 | 
			
		||||
    padding-top: 5px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
/* 定义页脚位置 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* 定义页脚位置 */
 | 
			
		||||
table {
 | 
			
		||||
  width: 100%; /* 让表格宽度100%占满其父元素宽度 */
 | 
			
		||||
  height: auto; /* 高度根据内容自适应 */
 | 
			
		||||
 | 
			
		||||
@ -147,7 +147,7 @@ const userList = ref<UserApi.UserVO[]>([]) // 用户列表
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const modal = ref();
 | 
			
		||||
const loading = ref(true) // 列表的加载中
 | 
			
		||||
const loading = ref(false) // 列表的加载中
 | 
			
		||||
const list = ref([]) // 列表的数据
 | 
			
		||||
const total = ref(0) // 列表的总页数
 | 
			
		||||
const queryParams = reactive({
 | 
			
		||||
@ -163,6 +163,14 @@ const queryParams = reactive({
 | 
			
		||||
  procdureName:undefined,
 | 
			
		||||
  blueprintNo:undefined,
 | 
			
		||||
})
 | 
			
		||||
const businessFields = [
 | 
			
		||||
  'projectCode',
 | 
			
		||||
  'projectName',
 | 
			
		||||
  'projectSubName',
 | 
			
		||||
  'materialName',
 | 
			
		||||
  'procdureName', // 保持与数据对象一致
 | 
			
		||||
  'blueprintNo'
 | 
			
		||||
]
 | 
			
		||||
const queryFormRef = ref() // 搜索的表单
 | 
			
		||||
const exportLoading = ref(false) // 导出的加载中
 | 
			
		||||
 | 
			
		||||
@ -199,10 +207,20 @@ const getList = async () => {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// 计算属性:判断是否所有业务条件都为空
 | 
			
		||||
const allConditionsEmpty = computed(() => {
 | 
			
		||||
  return businessFields.every(field => {
 | 
			
		||||
    const value = queryParams[field]
 | 
			
		||||
    return value === undefined || value === null || value.trim() === ''
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
/** 搜索按钮操作 */
 | 
			
		||||
const handleQuery = () => {
 | 
			
		||||
  if (allConditionsEmpty.value) {
 | 
			
		||||
    message.error("必须输入查询条件查询")
 | 
			
		||||
    return
 | 
			
		||||
  }
 | 
			
		||||
  queryParams.pageNo = 1
 | 
			
		||||
  getList()
 | 
			
		||||
}
 | 
			
		||||
@ -219,8 +237,8 @@ const formRef = ref()
 | 
			
		||||
 | 
			
		||||
/** 初始化 **/
 | 
			
		||||
onMounted(async () => {
 | 
			
		||||
	loading.value = true
 | 
			
		||||
  await getList()
 | 
			
		||||
	// loading.value = true
 | 
			
		||||
  // await getList()
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
<style>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user