| | |
| | | item.setStatus(1); |
| | | item.setUpdateBy(getUserId()); |
| | | item.setUpdateTime(new Date()); |
| | | if(item.getPlandeAmt()!=null && item.getRealdeAmt()!=null){ |
| | | item.setExcessAmount(item.getRealdeAmt()-item.getPlandeAmt()); |
| | | } |
| | | if(item.getPlandeDate()!=null && item.getRealinDate()!=null){ |
| | | Integer days = (int) ((item.getRealinDate().getTime() - item.getPlandeDate().getTime()) / (1000*3600*24)); |
| | | item.setExcessTime(days); |
| | | } |
| | | |
| | | itemService.insertAll(item); |
| | | return R.ok(); |
| | | } |
| | |
| | | item.setRealEndTime(newitem.getRealEndTime()); |
| | | item.setRealStartTime(newitem.getRealStartTime()); |
| | | } |
| | | //超出运费 |
| | | if(item.getPlandeAmt()!=null && item.getRealdeAmt()!=null){ |
| | | item.setExcessAmount(item.getRealdeAmt()-item.getPlandeAmt()); |
| | | } |
| | | //超出天数 |
| | | if(item.getRealinDate()!=null && item.getPlaninDate()!=null){ |
| | | Double days = (double) ((item.getRealinDate().getTime() - item.getPlaninDate().getTime()) / (1000*3600*24)); |
| | | Integer day= (int) Math.ceil(days); |
| | | item.setExcessTime(day); |
| | | } |
| | | item.setUpdateBy(getUserId()); |
| | | item.setUpdateTime(new Date()); |
| | | itemService.update(item,new EntityWrapper<Item>() |
| | |
| | | Wrapper<Item> wrapper = new EntityWrapper<>(); |
| | | data.setTotalQuantity(itemService.selectCount(wrapper));//项目总共数量 |
| | | data.setIntoSum(itemService.selectCount(wrapper.eq("type","10")));//集成项目数 |
| | | data.setWrongInto(itemService.selectCount(wrapper.ne("type","10")));//非集成项目数 |
| | | data.setInspected(itemService.selectCount(wrapper.eq("realLADate","").and().eq("realLADate",null)));//已验收项目数量 |
| | | data.setWrongInspected(itemService.selectCount(wrapper.ne("realLADate",null)));//未验收项目数量 |
| | | data.setFinished(itemService.selectCount(wrapper.ne("realinDate", null).eq("realLADate", null)));//已完工未验收数量 |
| | | data.setWrongInto(data.getTotalQuantity()-data.getIntoSum());//非集成项目数 |
| | | List<Item> list = itemService.inspected(); |
| | | data.setInspected(list.size());//已验收项目数量 |
| | | data.setWrongInspected(data.getTotalQuantity()-data.getInspected());//未验收项目数量 |
| | | List<Item> lists = itemService.finished(); |
| | | data.setFinished(lists.size());//已完工未验收数量 |
| | | return R.ok().add(data); |
| | | } |
| | | |
| | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @TableName("man_item") |
| | | public class Item implements Serializable { |
| | |
| | | private Integer planCarnumber; |
| | | |
| | | /** |
| | | * 预计车辆数量 |
| | | * 超出金额 |
| | | */ |
| | | @ApiModelProperty(value= "超出金额") |
| | | @TableField("Excess_amount") |
| | | private Double ExcessAmount; |
| | | private Double excessAmount; |
| | | |
| | | /** |
| | | * 预计车辆数量 |
| | | * 超出天数 |
| | | */ |
| | | @ApiModelProperty(value= "超出天数") |
| | | @TableField("Excess_time") |
| | | private Integer ExcessTime; |
| | | private Integer excessTime; |
| | | |
| | | public Item() {} |
| | | |
| | |
| | | public interface ItemMapper extends BaseMapper<Item> { |
| | | List<Item> chaoPrice(Map<String, Object> map,String uuid); |
| | | List<Item> chaoTime(Map<String, Object> map,String uuid); |
| | | List<Item> inspected(); |
| | | List<Item> finished(); |
| | | } |
| | |
| | | Page<Item> chaoPirce(Page<Item> page,String uuid); |
| | | |
| | | Page<Item> chaoTime(Page<Item> page,String uuid); |
| | | |
| | | List<Item> inspected(); |
| | | |
| | | List<Item> finished(); |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | @Override |
| | | public List<Item> inspected(){ |
| | | return baseMapper.inspected(); |
| | | } |
| | | @Override |
| | | public List<Item> finished(){ |
| | | return baseMapper.finished(); |
| | | } |
| | | } |
| | |
| | | <result column="planLADate" property="planLADate" /> |
| | | <result column="realLADate" property="realLADate" /> |
| | | <result column="planCarnumber" property="planCarnumber"/> |
| | | <result column="Excess_amount" property="excessAmount"/> |
| | | <result column="Excess_time" property="excessTime"/> |
| | | </resultMap> |
| | | <select id="chaoPrice" resultMap="BaseResultMap"> |
| | | select * from man_item where 1=1 and realdeAmt>plandeAmt |
| | |
| | | and uuid=#{uuid} |
| | | </if> |
| | | </select> |
| | | <select id="inspected" resultMap="BaseResultMap"> |
| | | select * from man_item where realLADate is not null |
| | | </select> |
| | | <select id="finished" resultMap="BaseResultMap"> |
| | | select * from man_item where realLADate is null and realinDate is not null |
| | | </select> |
| | | </mapper> |
| | |
| | | ,{field: 'cstmrUuid$', align: 'center',title: '客户名称'} |
| | | ,{field: 'plandeAmt', align: 'center',title: '预计运费'} |
| | | ,{field: 'realdeAmt', align: 'center',title: '实际运费'} |
| | | ,{field: 'ExcessAmount', align: 'center',title: '超出运费'} |
| | | ,{field: 'excessAmount', align: 'center',title: '超出运费'} |
| | | ,{field: 'dutyMan', align: 'center', title: '责任人'} |
| | | ,{field: 'dutyDepartment', align: 'center', title: '责任部门'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | |
| | | ,{field: 'cstmrUuid$', align: 'center',title: '客户名称'} |
| | | ,{field: 'planinDate$', align: 'center',title: '预计安装日期'} |
| | | ,{field: 'realinDate$', align: 'center',title: '实际安装日期'} |
| | | ,{field: 'ExcessTime', align: 'center',title: '超出天数'} |
| | | ,{field: 'excessTime', align: 'center',title: '超出天数'} |
| | | ,{field: 'dutyMan', align: 'center', title: '责任人'} |
| | | ,{field: 'dutyDepartment', align: 'center', title: '责任部门'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |