作者 张晓杰

生产订单、产品设计

... ... @@ -20,4 +20,39 @@
NOW())>= 0
AND STATUS = '生产中'
</select>
<select id="selectAll" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
SELECT
a.id,a.create_by,a.create_time,a.update_by,a.update_time,a.sys_org_code,a.order_id,a.order_company,
a.work_order,a.product_name,b.product_type_name as product_type,a.order_date,a.designer,
a.dispatch_date,a.delivery_date,a.quantity,a.total_working_hours,a.dispatched_working_hours,a.STATUS,
a.finish_date,a.dispatch_status,a.product_design_status,a.verify_status,a.verify_result,a.delivery_date1,a.pics,a.pics2
FROM
tbl_order_form a
LEFT JOIN tbl_product_type b on a.product_type = b.product_type_id
</select>
<select id="getCountByType" parameterType="java.lang.String" resultType="java.lang.Integer">
SELECT
count(product_type)
FROM
tbl_order_form
WHERE
order_id like CONCAT( #{productType}, '%')
</select>
<select id="selectOneById" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
SELECT
a.id,a.create_by,a.create_time,a.update_by,a.update_time,a.sys_org_code,a.order_id,a.order_company,
a.work_order,a.product_name,b.product_type_name as product_type,a.order_date,a.designer,
a.dispatch_date,a.delivery_date,a.quantity,a.total_working_hours,a.dispatched_working_hours,a.STATUS,
a.finish_date,a.dispatch_status,a.product_design_status,a.verify_status,a.verify_result,a.delivery_date1,a.pics,a.pics2
FROM
tbl_order_form a
LEFT JOIN tbl_product_type b on a.product_type = b.product_type_id where a.id =#{id}
</select>
<update id="updateDesignerByOrderId" parameterType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
update tbl_order_form set designer = #{designer},assign_design_status = #{assignDesignStatus},dispatch_date=#{dispatchDate} where order_id =#{orderId}
</update>
<update id="updateProductDesignStatusByOrderId" parameterType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
update tbl_order_form set product_design_status = #{productDesignStatus} where order_id =#{orderId}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -31,4 +31,12 @@ public interface ITblOrderFormService extends IService<TblOrderForm> {
List<TblOrderForm> pageTblOrderFormDate(Integer integer);
Integer getCountByType(String productType);
TblOrderForm selectOneById(String id);
Integer updateDesignerByOrderId(TblOrderForm tblOrderForm);
Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm);
}
... ...
... ... @@ -48,4 +48,24 @@ public class TblOrderFormServiceImpl extends ServiceImpl<TblOrderFormMapper, Tbl
return tblOrderFormMapper.pageTblOrderFormDate(integer);
}
@Override
public Integer getCountByType(String productType) {
return tblOrderFormMapper.getCountByType(productType);
}
@Override
public TblOrderForm selectOneById(String id) {
return tblOrderFormMapper.selectOneById(id);
}
@Override
public Integer updateDesignerByOrderId(TblOrderForm tblOrderForm) {
return tblOrderFormMapper.updateDesignerByOrderId(tblOrderForm);
}
@Override
public Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm) {
return tblOrderFormMapper.updateProductDesignStatusByOrderId(tblOrderForm);
}
}
... ...
... ... @@ -7,8 +7,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
import org.jeecg.modules.erp.salary.service.TblSalaryBaseService;
... ... @@ -17,7 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.*;
/**
* @Description: tbl_salary_base
... ... @@ -56,6 +58,13 @@ public class TblSalaryBaseController {
return Result.OK(pageList);
}
//人员下拉
@GetMapping(value = "/listSalary")
public Result<List<Map<String,String>>> listSalary(){
List<Map<String,String>> list = tblSalaryBaseService.selectUserAll();
return Result.ok(list);
}
@ApiOperation(value = "tbl_salary_base-手机号验证")
@GetMapping(value = "/listphone")
public Result<?> listphone(@RequestParam(name = "phone", required = true) String phone){
... ...
... ... @@ -3,6 +3,9 @@ package org.jeecg.modules.erp.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
... ... @@ -12,6 +15,7 @@ import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
*/
public interface TblSalaryBaseMapper extends BaseMapper<TblSalaryBase> {
List<Map<String,String>> selectUserAll();
}
... ...
... ... @@ -29,4 +29,7 @@
social_person,notes,create_by,
create_time,update_by,update_time
</sql>
<select id="selectUserAll" resultType="java.util.Map">
SELECT a.job_id jobId,CONCAT(a.user_name,'(',b.job_title,')') as userName from tbl_salary_base a left join tbl_salary_suanfa b on a.job_title = b.job_id
</select>
</mapper>
... ...
... ... @@ -3,6 +3,9 @@ package org.jeecg.modules.erp.salary.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
... ... @@ -11,4 +14,5 @@ import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
*/
public interface TblSalaryBaseService extends IService<TblSalaryBase> {
List<Map<String,String>> selectUserAll();
}
... ...
... ... @@ -6,8 +6,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
import org.jeecg.modules.erp.salary.mapper.TblSalaryBaseMapper;
import org.jeecg.modules.erp.salary.service.TblSalaryBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
* @description 针对表【tbl_salary_base】的数据库操作Service实现
... ... @@ -17,6 +21,13 @@ import org.springframework.stereotype.Service;
public class TblSalaryBaseServiceImpl extends ServiceImpl<TblSalaryBaseMapper, TblSalaryBase>
implements TblSalaryBaseService {
@Autowired
private TblSalaryBaseMapper tblSalaryBaseMapper;
@Override
public List<Map<String, String>> selectUserAll() {
return tblSalaryBaseMapper.selectUserAll();
}
}
... ...
... ... @@ -138,10 +138,15 @@ public class CommonController {
// 获取文件名
String orgName = mf.getOriginalFilename();
orgName = CommonUtils.getFileName(orgName);
// if(orgName.indexOf(".")!=-1){
// fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf("."));
// }else{
// fileName = orgName+ "_" + System.currentTimeMillis();
// }
if(orgName.indexOf(".")!=-1){
fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf("."));
fileName = System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf("."));
}else{
fileName = orgName+ "_" + System.currentTimeMillis();
fileName = System.currentTimeMillis()+"";
}
String savePath = file.getPath() + File.separator + fileName;
File savefile = new File(savePath);
... ...