Commit 910e5d6a authored by suichenguang's avatar suichenguang
parents 94123564 4e277611
......@@ -57,6 +57,8 @@ public class UserApi {
private FailedTypeService failedTypeService;
@Autowired
private ProdCardService prodCardService;
@Autowired
private UtilService utilService;
// @Autowired
// private ReadCountyListXMLService readCountyListXMLService;
......@@ -1769,4 +1771,31 @@ public class UserApi {
}
/**
* 查询级联菜单列表
*/
@RequestMapping("getAllPoliceStation")
// @RequiresPermissions("userInfo.add")//权限管理;
public String getAll( HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
YXJSONResponse yxresp = new YXJSONResponse();
List all = utilService.findAllPoliceStation();
yxresp.outPutSuccess(all);
return yxresp.toJSONString();
}
/**
* 查询级联菜单列表
*/
@RequestMapping("getTypeListData")
// @RequiresPermissions("userInfo.add")//权限管理;
public String getTypeListData( HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
YXJSONResponse yxresp = new YXJSONResponse();
List all = utilService.findTypeListData();
yxresp.outPutSuccess(all);
return yxresp.toJSONString();
}
}
......@@ -14,8 +14,8 @@ import java.util.Map;
@Mapper
public interface CardBodyMapper {
public List <CardBodyEntity> findCardBody(String cardBodyId);
public int insertCardBody(@Param("cardTypeId") String cardTypeId,@Param("isActive") String isActive,@Param("taskId") String taskId,@Param("totalCount") String totalCount);
public int insertCardBody(@Param("cardTypeId") String cardTypeId, @Param("isActive") String isActive, @Param("taskId") String taskId, @Param("totalCount") String totalCount);
// public int updateCardBody(CardBodyEntity map);
public List<Map<String,Object>> findCbCountByDealdateViewData(@Param("startTime")String startTime,@Param("endTime")String endTime );
public List<Map<String,Object>> findCbCountByDealdateViewData(@Param("startTime") String startTime, @Param("endTime") String endTime);
public List<Map<String,Object>> findCbCountByDealdate();
}
\ No newline at end of file
......@@ -17,12 +17,12 @@ import java.util.Map;
@Mapper
public interface CountyListMapper {
public List<CountyEntity> findCountyList(String taskId);
public int reviseStorageCount( @Param("taskId") String taskId, @Param("countyCode") String countyCode,@Param("inStorageCount") String inStorageCount,@Param("outStorageCount") String out_Storage_Count);
public List<ReceiptListEntity> getReceiptList( @Param("startDate")String startDate , @Param("endDate") String endDate);
public int reviseStorageCount(@Param("taskId") String taskId, @Param("countyCode") String countyCode, @Param("inStorageCount") String inStorageCount, @Param("outStorageCount") String out_Storage_Count);
public List<ReceiptListEntity> getReceiptList(@Param("startDate") String startDate, @Param("endDate") String endDate);
public List<CountyListEntity> findStorageCountByTaskId(String taskId);
public int totalFinshCount ();
public int totalInStorageCount ();
public int totalOutStorageCount ();
public int totalFinshCount();
public int totalInStorageCount();
public int totalOutStorageCount();
// public List<Map<String, Object>> PrintCountyListXML();
}
......@@ -11,5 +11,5 @@ import java.util.Map;
*/
@Mapper
public interface FindCardMapper {
public List<Map<String,Object>>findCardByGroupNo(@Param("find_No")String find_No);
public List<Map<String,Object>>findCardByGroupNo(@Param("find_No") String find_No);
}
......@@ -11,6 +11,6 @@ import java.util.Map;
*/
@Mapper
public interface FindFinancialReportByViewMapper {
public List<Map<String,Object>>findFinancialReportByView(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("cardType")String cardType,@Param("cityCode")String cityCode);
public List<Map<String,Object>>findFinancialReportByView(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("cardType") String cardType, @Param("cityCode") String cityCode);
}
......@@ -15,5 +15,5 @@ import java.util.Map;
@Mapper
public interface FindTaskByDealdateViewMapper {
public List<Map<String,Object>> findTaskByDealdateViewData(@Param("startTime") String startTime,@Param("endTime") String endTime);
public List<Map<String,Object>> findTaskByDealdateViewData(@Param("startTime") String startTime, @Param("endTime") String endTime);
}
......@@ -20,7 +20,7 @@ public interface GroupNoMapper {
public int findGroupNoCountByTaskId(String task_Id);
public List<Map<String,Object>> findSpecialCountyList(String task_Id);
public List<Map<String,Object>> findNormalCountyList(String task_Id);
public List<GroupListEntity> findGroupListByTaskId( String taskId);
public List<GroupListEntity> findGroupListByTaskId(String taskId);
}
......@@ -16,7 +16,7 @@ public interface PoliceStationApplyReasonMapper {
public int updatePoliceStationApplyReasonEntity(PoliceStationApplyReasonEntity policeStationApplyReasonEntity);
public List<Map<String,Object>> findNormalApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findSpecialApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate( @Param("startDate") String startDate,@Param("endDate") String endDate);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(@Param("startDate") String startDate, @Param("endDate") String endDate);
public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType);
public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String city);
public List<Map<String,Object>> findPoliceStationApplyReasonByCounty(String county);
......
......@@ -18,9 +18,9 @@ public interface SpecialCardMapper {
public void saveSpecialCardEntity(SpecialCardEntity specialCardEntity);
public void updateSpecialCardEntity(SpecialCardEntity specialCardEntity);
public List<SpecialCardEntity> findSpecialCardEntityByGroupNo(String groupNo);
public List <SpecialCardEntity> findSpecialCardList( String groupNo);
public List <SpecialCardEntity> findSpecialCardList(String groupNo);
public List <SpecialCardEntity> addTuiZheng(String acceptNumber);
public List<SpecialCardEntity> addRemainingCard(String accept_Number);
public List<ProdCardEntity> getProdCard ( String idNo);
public List<ProdCardEntity> getProdCard(String idNo);
public List<FailedTypeEntity> getFailedType();
}
......@@ -70,7 +70,7 @@ public interface SysPermissionMapper{
* @return
*/
@Select("select name from SYS_PERMISSION WHERE ID=#{parentId}")
public String selectParentNameById(@Param("parentId")Long parentId);
public String selectParentNameById(@Param("parentId") Long parentId);
/**
* 修改权限信息
......
......@@ -26,7 +26,7 @@ public interface SysRoleMapper {
* @param permissionId
*/
@Insert("INSERT INTO SYS_ROLE_PERMISSION(ROLE_ID,PERMISSION_ID)VALUES(#{roleId},#{permissionId})")
public void addRolePermission(@Param("roleId")Integer roleId,@Param("permissionId") Integer permissionId);
public void addRolePermission(@Param("roleId") Integer roleId, @Param("permissionId") Integer permissionId);
/**
* 查询所有角色
......@@ -77,7 +77,7 @@ public interface SysRoleMapper {
* @param roleId
*/
@Update("update SYS_USER_ROLE SET ROLE_ID=#{roleId} where USER_ID=#{userId}")
public void updateUserRole(@Param("userId") Integer userId,@Param("roleId")Integer roleId);
public void updateUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
/**
* 删除角色
......@@ -120,5 +120,5 @@ public interface SysRoleMapper {
* @param oldPermissionId
*/
@Delete("delete from SYS_ROLE_PERMISSION WHERE ROLE_ID=#{roleId} AND PERMISSION_ID=#{oldPermissionId}")
public void delRolePermission(@Param("roleId") Integer roleId,@Param("oldPermissionId") Integer oldPermissionId);
public void delRolePermission(@Param("roleId") Integer roleId, @Param("oldPermissionId") Integer oldPermissionId);
}
......@@ -17,11 +17,12 @@ public interface TaskMapper {
public int updateTaskEntity(TaskEntity taskEntity);
public List<TaskEntity> findTaskEntityByAcceptNo(String acceptNo);
public List<TaskEntity> findTaskEntityByState(int state);
public int updateTaskIsException(@Param("taskId") String taskId,@Param("exceptionInformation") String exceptionInformation,@Param("isException")String isException);
public int replaceExceptionInformation(@Param("taskId")String taskId,@Param("isException")String isException);
public int updateTaskIsException(@Param("taskId") String taskId, @Param("exceptionInformation") String exceptionInformation, @Param("isException") String isException);
public int replaceExceptionInformation(@Param("taskId") String taskId, @Param("isException") String isException);
public List<TypeListEntity> findTypeListByTaskStateId(String taskStateId);
public List <CityListEntity> findCityList(@Param("taskStateId") String taskStateId,@Param("cardType") String cardType);
public List <CityListEntity> findCityList(@Param("taskStateId") String taskStateId, @Param("cardType") String cardType);
public int updateOutStorageDate(String taskId);
public int updateInStorageDate(String taskId);
public int updateStorageDate(String taskId);
}
......@@ -45,7 +45,7 @@ public interface UserInfoMapper {
* @param roleId
*/
@Insert("INSERT INTO SYS_USER_ROLE(USER_ID,ROLE_ID)VALUES(#{userId},#{roleId})\n")
public void saveUserRole(@Param("userId") Integer userId, @Param("roleId")Integer roleId);
public void saveUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
/**
* 查询所有用户
......
......@@ -3,6 +3,8 @@ package com.yxproject.start.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author zhangyusheng
*/
......@@ -35,6 +37,10 @@ public interface UtilMapper {
* 查询派出所证件申请表序列值
*/
public int findPoliceStationApplyReasonSequenceNextValue();
public List queryAllPoliceStation();
public List queryMakeTypeList();
}
......@@ -12,9 +12,9 @@ import java.util.Map;
public interface CardBodyService {
public List<CardBodyEntity> findCardBody(String cardBodyId);
public int insertCardBody(String cardTypeId,String isActive,String taskId,String totalCount);
public int insertCardBody(String cardTypeId, String isActive, String taskId, String totalCount);
public List<Map<String,Object>> getCbCount(String startTime,String endTime);
public List<Map<String,Object>> getCbCount(String startTime, String endTime);
// public int updateCardBody(CardBodyEntity map);
......
......@@ -11,7 +11,7 @@ import java.util.Map;
*/
@Service
public interface CityListService {
public List <CityListEntity> findCityList( String taskStateId ,String cardType);
public List <CityListEntity> findCityList(String taskStateId, String cardType);
// public List <CityListEntity> findCityListByCardType(String cardType);
}
......@@ -9,5 +9,5 @@ import java.util.Map;
public interface CountyListService {
public List<CountyListEntity> findStorageCountByTaskId(String taskId);
public int reviseStorageCount(String taskId,String countyCode, String inStorageCount, String outStorageCount);
public int reviseStorageCount(String taskId, String countyCode, String inStorageCount, String outStorageCount);
}
......@@ -8,7 +8,7 @@ import java.util.List;
* Created by Administrator on 2018/12/19.
*/
public interface CountyService {
public List<CountyEntity> findCountyList( String taskId);
public List<CountyEntity> findCountyList(String taskId);
}
......@@ -7,5 +7,5 @@ import java.util.Map;
* Created by Administrator on 2018/12/19.
*/
public interface FindFinancialReportByViewService {
public List<Map<String,Object>> getFinancialReportData(String startTime, String endTime,String cardType,String cityCode);
public List<Map<String,Object>> getFinancialReportData(String startTime, String endTime, String cardType, String cityCode);
}
......@@ -9,5 +9,5 @@ import java.util.Map;
* Created by Administrator on 2018/11/21.
*/
public interface FindTaskByDealdateViewService {
public List<Map<String,Object>> getAccGroupData(String startTime,String endTime);
public List<Map<String,Object>> getAccGroupData(String startTime, String endTime);
}
......@@ -9,6 +9,6 @@ import java.util.List;
*/
public interface GroupListService {
public List<GroupListEntity> findGroupListByTaskId( String taskId);
public List<GroupListEntity> findGroupListByTaskId(String taskId);
}
......@@ -8,7 +8,7 @@ import java.util.Map;
*/
public interface PoliceStationApplyReasonService {
public int savePoliceStationApplyReasonEntity(String cyclesheetID);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String startDate,String endDate);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String startDate, String endDate);
public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType);
public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String cityCode);
}
......@@ -11,5 +11,5 @@ import java.util.Map;
public interface ProdCardService {
public List<ProdCardEntity> getProdCard ( List idNo);
public List<ProdCardEntity> getProdCard(List idNo);
}
......@@ -8,6 +8,6 @@ import java.util.List;
* Created by Administrator on 2018/12/19.
*/
public interface ReceiptListService {
public List <ReceiptListEntity> getReceiptList( String startDate, String endDate);
public List <ReceiptListEntity> getReceiptList(String startDate, String endDate);
}
......@@ -25,7 +25,7 @@ public interface SysRoleService {
* @return
*/
public boolean updateRole(SysRole sysRole,JSONArray ids,JSONArray oldIds);
public boolean updateRole(SysRole sysRole, JSONArray ids, JSONArray oldIds);
/**
* 查询所有角色
......
......@@ -22,13 +22,12 @@ public interface TaskService {
public int savePoliceStationVailedEntity(List<PoliceStationVailedEntity> policeStationVailedInfoEntities);
public List<PoliceStationVailedEntity> find( String id);
public List<PoliceStationVailedEntity> find(String id);
public List<Map<String,Object>> findProductionTaskListEntityByState(int state);
public int addExceptionState(String taskId, String exceptionInformation);
// public int updateStorageDate(String taskListId,String inStorageCount,String outStorageCount);
......
......@@ -9,5 +9,5 @@ import java.util.List;
*/
public interface TypeListService {
public List<TypeListEntity> findTypeListByTaskStateId( String taskStateId);
public List<TypeListEntity> findTypeListByTaskStateId(String taskStateId);
}
......@@ -22,7 +22,7 @@ public interface UserInfoService{
* @param roleId
* @return
*/
public boolean addUser(UserInfo userinfo,Integer roleId);
public boolean addUser(UserInfo userinfo, Integer roleId);
/**
* 查询所有用户
......@@ -57,7 +57,7 @@ public interface UserInfoService{
* @param roleId
* @return
*/
public boolean updateUser(UserInfo userInfo, Integer roleId,Integer oldRoleId);
public boolean updateUser(UserInfo userInfo, Integer roleId, Integer oldRoleId);
// int delUsername( UserInfo userInfo);
// int updateUsername(UserInfo userInfo);
......
package com.yxproject.start.service;
import java.util.List;
public interface UtilService {
public int findProductionTaskListSequenceNextValue();
public int findGroupInfoSequenceNextValue();
List findAllPoliceStation();
List findTypeListData();
}
......@@ -6,6 +6,7 @@ import com.yxproject.start.entity.prod.ProdCardTEntity;
import com.yxproject.start.mapper.*;
import com.yxproject.start.entity.CountyListEntity;
import com.yxproject.start.service.TaskService;
import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -446,4 +447,5 @@ public class TaskServiceImpl implements TaskService {
List<PoliceStationVailedEntity> policeStationVailedInfoEntityByID = policeStationVailedMapper.findPoliceStationVailedEntity(id);
return policeStationVailedInfoEntityByID;
}
}
......@@ -2,9 +2,15 @@ package com.yxproject.start.service.impl;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.UtilService;
import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
*/
......@@ -21,4 +27,77 @@ public class UtilServiceImpl implements UtilService {
public int findGroupInfoSequenceNextValue() {
return utilMapper.findGroupInfoSequenceNextValue();
}
/**
* 级联菜单
*
* @return
*/
@Override
public List findAllPoliceStation() {
List<Map<String,Object>> listWithSQL = utilMapper.queryAllPoliceStation();
Map<String,Object> countyMap = new LinkedHashMap<String,Object>();
for (Map<String,Object> map :listWithSQL){
if(countyMap.containsKey(map.get("COUNTY_CODE").toString())){
List<Map<String, Object>> mapList = (List<Map<String, Object>>) countyMap.get(map.get("COUNTY_CODE").toString());
Map<String,Object> gajgMap = new HashedMap();
gajgMap.put("GAJG_DM",map.get("POLICE_CODE"));
gajgMap.put("GAJG_MC",map.get("GAJG_MC"));
gajgMap.put("info",map);
mapList.add(gajgMap);
}else {
List<Map<String, Object>> mapList = new ArrayList<>();
Map<String,Object> gajgMap = new HashedMap();
gajgMap.put("GAJG_DM",map.get("POLICE_CODE"));
gajgMap.put("GAJG_MC",map.get("GAJG_MC"));
gajgMap.put("info",map);
mapList.add(gajgMap);
countyMap.put(map.get("COUNTY_CODE").toString(),mapList);
}
}
Map<String,Object> cityMap = new LinkedHashMap<String,Object>();
for (String countyCode :countyMap.keySet()){
if (cityMap.containsKey(countyCode.substring(0,4))){
List<Map<String, Object>> mapList = (List<Map<String, Object>>) cityMap.get(countyCode.substring(0,4));
Map<String,Object> cityMapInfo = new HashedMap();
Map<String, Object> info = (Map<String, Object>) ((Map<String, Object>) ((List<Map<String, Object>>) countyMap.get(countyCode)).get(0)).get("info");
cityMapInfo.put("countyCode",info.get("COUNTY_CODE"));
cityMapInfo.put("countyName",info.get("COUNTYNAME"));
cityMapInfo.put("countyInfo",countyMap.get(countyCode));
mapList.add(cityMapInfo);
}else {
List<Map<String, Object>> mapList = new ArrayList<>();
Map<String,Object> cityMapInfo = new HashedMap();
Map<String, Object> info = (Map<String, Object>) ((Map<String, Object>) ((List<Map<String, Object>>) countyMap.get(countyCode)).get(0)).get("info");
cityMapInfo.put("countyCode",info.get("COUNTY_CODE"));
cityMapInfo.put("countyName",info.get("COUNTYNAME"));
cityMapInfo.put("countyInfo",countyMap.get(countyCode));
mapList.add(cityMapInfo);
cityMap.put(countyCode.substring(0,4),mapList);
}
}
List cityList = new ArrayList<>();
for (String citycode :cityMap.keySet()){
if ("0000".equals(citycode)){
}else {
Map<String,Object> map = new HashedMap();
map.put("cityCode",citycode);
map.put("cityInfo",cityMap.get(citycode));
Map<String, Object> info = (Map<String, Object>) ((Map<String, Object>) ((List<Map<String, Object>>) countyMap.get(citycode + "00")).get(0)).get("info");
map.put("cityName",info.get("CITYNAME"));
cityList.add( map);
}
}
return cityList;
}
@Override
public List findTypeListData() {
return utilMapper.queryMakeTypeList();
}
}
......@@ -19,6 +19,18 @@
<select id="findPoliceStationApplyReasonSequenceNextValue" resultType="int">
select APPLY_REASON_SEQ.nextval from dual
</select>
<select id="queryAllPoliceStation" resultType="java.util.HashMap">
select SUBSTR(GAJG_DM.GAJG_DM,0,8) police_Code,
GAJG_DM.GAJG_MC,decode(COUNTY_DIC.COUNTY_CODE,null,'000000',COUNTY_DIC.COUNTY_CODE) COUNTY_CODE,
decode(COUNTY_DIC.COUNTYNAME,null,'000000',COUNTY_DIC.COUNTYNAME) COUNTYNAME ,
SUBSTR(GAJG_DM.XZQH_DM,0,4) city_code,CITY_DIC.CITYNAME from GAJG_DM
left join COUNTY_DIC ON COUNTY_DIC.COUNTY_CODE = SUBSTR(GAJG_DM.GAJG_DM,0,6)
LEFT JOIN CITY_DIC ON SUBSTR(CITY_DIC.CITYCODE,0,4) = SUBSTR(GAJG_DM.GAJG_DM,0,4)
order by SUBSTR(GAJG_DM.GAJG_DM,0,8)
</select>
<select id="queryMakeTypeList" resultType="java.util.HashMap">
select * from card_type_dic
</select>
</mapper>
\ No newline at end of file
......@@ -577,6 +577,31 @@ app.service('MessageService', function (ngDialog) {
})
},
getAllPoliceStation:function(success){
$http({
method: 'GET',
url: "../user/getAllPoliceStation" + urlTimeStamp()
}).then(function successCallback(response) {
console.log(response.data,"-------------getAllPoliceStation.data------")
success(response.data)
},function(err){
var errA = {Error:true, ReturnCode:err.status, ReturnMsg:"API访问返回错误"}
MessageService.httpRequestFailed(JSON.stringify(errA))
})
},
getTypeListData:function(success){
$http({
method: 'GET',
url: "../user/getTypeListData" + urlTimeStamp()
}).then(function successCallback(response) {
console.log(response.data,"-------------getAllPoliceStation.data------")
success(response.data)
},function(err){
var errA = {Error:true, ReturnCode:err.status, ReturnMsg:"API访问返回错误"}
MessageService.httpRequestFailed(JSON.stringify(errA))
})
},
getprintReceipt:function(startDate,endDate,success) {
$http({
method: 'GET',
......
......@@ -16,6 +16,26 @@
<input type="submit" ng-if="userState==2||state=='02'" class="btn btn-primary" value="查询" ng-click="myClick()">
<span ng-if="msgAlert" style="color:red;font-size: 17px;">{{msgAlert}}</span>
</div>
<div class="yx-div-header" ng-if="userState==8">
<span>起始时间:</span>
<input type="text" id="wdate1" class="Wdate" ng-model="month_first" onClick="WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})">
<span>结束时间:</span>
<input type="text" id="wdate2" class="Wdate" ng-model="month_last" onClick="WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})">
<select id="selectType" style="height: 30px;border-radius: 4px;">
<option value="{{type.CARD_TYPE_ID}}" ng-repeat="type in typeList">{{type.CARD_TYPE}}</option>
</select>
<select id="selectCountry" style="height: 30px;border-radius: 4px;" ng-model="vm.country" ng-options="country.cityName for country in vm.countries">
<option value="">地市</option>
</select>
<select style="height: 30px;border-radius: 4px;" ng-model="vm.province"
ng-options="province.countyName for province in vm.country.cityInfo">
<option value="">区县</option>
</select>
<select style="height: 30px;border-radius: 4px;" ng-model="vm.city" ng-options="city.GAJG_MC for city in vm.province.countyInfo">
<option value="">派出所</option>
</select>
<input type="submit" class="btn btn-primary" value="查询" ng-click="myClickFinance()">
</div>
<!--</div>-->
</div>
<div style="padding: 10px;background-color: #fff;border: 1px solid #CCC;border-radius: 10px;">
......
......@@ -6,7 +6,7 @@ app.controller('yieldReportCtrl', ['$scope', '$rootScope', '$http', '$state', '$
$state.go("layout.yieldReport")
}
// $scope.userState = $rootScope.loginData.workshop;
$scope.userState=2;
$scope.userState=8;
$scope.date = "date";
......@@ -119,24 +119,7 @@ app.controller('yieldReportCtrl', ['$scope', '$rootScope', '$http', '$state', '$
}
var getQualityCheckReport = function (month) {
// if ($rootScope.loginData.state == 6) {
// HttpService.getQualityCheckReportData(month, function (data) {
// $scope.qulityCheckData = data.respData;
// console.log("质检报表:", $scope.qulityCheckData)
// })
// }
// if ($rootScope.loginData.state == 0) {
// HttpService.getAdminQualityCheckReportData(month, $scope.state.substring(1, 2), function (data) {
// $scope.qulityCheckData = data.respData;
// console.log("质检报表:", $scope.qulityCheckData)
// })
// }
}
// if ($rootScope.loginData.state == 6 || $rootScope.loginData.state == 0) {
// getQualityCheckReport($scope.nowMonth)
// }
$scope.printQualityCheckReport = function () {
var month = $("#wdateZj").val()
......@@ -163,24 +146,6 @@ app.controller('yieldReportCtrl', ['$scope', '$rootScope', '$http', '$state', '$
}
var getPingReportByDay = function (date) {
if ($rootScope.loginData.state == 4) {
HttpService.getPingReportByDayData(date, function (data) {
$scope.pingReportByDay = data.respData;
console.log("车间日报表:", $scope.pingReportByDay)
})
}
if ($rootScope.loginData.state == 0) {
// HttpService.getAdminPingReportByDayData(date, 'p' + $scope.state.substring(1, 2), function (data) {
// $scope.pingReportByDay = data.respData;
// console.log("车间日报表:", $scope.pingReportByDay)
// })
}
}
if ($rootScope.loginData.state == 4 || $rootScope.loginData.state == 0) {
getPingReportByDay($scope.nowDate);
}
$scope.printPingReportByDay = function () {
var date = $("#wdateCj").val()
......@@ -207,33 +172,6 @@ app.controller('yieldReportCtrl', ['$scope', '$rootScope', '$http', '$state', '$
}
// var getCkReportByDay = function(date){
// HttpService.getYieldDailyReportByStorehouseData(date,function(data){
// $scope.storeRportData = data.respData;
// console.log("仓库产量日报表:",$scope.storeRportData)
// })
// }
// if($rootScope.loginData.state == 7){
// getCkReportByDay($scope.nowDate);
// }
// var getStorehouseReportDatas = function(start,end){
// HttpService.getCkReportData(start,end,function(data){
// $scope.StoreReportData= data.respData;
// for(var i=0;i<$scope.StoreReportData.length;i++){
// if(i==0){
// $scope.StoreReportData[i].isActive=true;
// }else{
// $scope.StoreReportData[i].isActive=false;
// }
// }
// console.log("初始化仓库报表:",data.respData)
// })
// }
// if($rootScope.loginData.state == 7||$rootScope.loginData.state == 0) {
// getStorehouseReportDatas($scope.month_first,$scope.month_last)
// }
$scope.showtable = -1;
$scope.showTable = function (index) {
if ($scope.showtable != index) {
......@@ -244,25 +182,6 @@ app.controller('yieldReportCtrl', ['$scope', '$rootScope', '$http', '$state', '$
}
}
var getStorehouseReportDatas = function (start, end) {
// HttpService.getStorehouseReportDatas(start, end, function (data) {
// $scope.totalCount = data.respData.sumInfo;
// $scope.StoreReportData = data.respData.listInfo;
// for (var i = 0; i < $scope.StoreReportData.length; i++) {
// if (i == 0) {
// $scope.StoreReportData[i].isActive = true;
// } else {
// $scope.StoreReportData[i].isActive = false;
// }
// }
// console.log("初始化仓库出入库报表:", data.respData)
// })
}
if ($rootScope.loginData.state == 7 || $rootScope.loginData.state == 0 || $rootScope.loginData.state == 8) {
// getStorehouseReportDatas($scope.month_first, $scope.month_last)
}
$scope.printStoreDayReport = function () {
var date = $("#wdateCj").val()
console.log("时间")
......@@ -301,4 +220,82 @@ app.controller('yieldReportCtrl', ['$scope', '$rootScope', '$http', '$state', '$
}
var vm = $scope.vm = {};
HttpService.getAllPoliceStation(function(data){
vm.countries = data.respData;
console.log(vm.countries)
})
HttpService.getTypeListData(function(data){
$scope.typeList = data.respData;
var json = {CARD_TYPE_ID: -1, CARD_TYPE: "全部类型"};
$scope.typeList.unshift(json);
console.log($scope.typeList)
})
$scope.myClickFinance = function () {
var start = $("#wdate1").val()
var end = $("#wdate2").val()
var makeType = $("#selectType").val()
var cityCode;
if(vm.country==undefined) {
cityCode = -1;
}else{
if(vm.province==null){
cityCode = vm.country.cityCode;
}else{
if(vm.city==null){
cityCode = vm.province.countyCode;
}else{
cityCode = vm.city.GAJG_DM;
}
}
}
if(parseInt(start)<=parseInt(end)){
getFinanceReportData(start,end,cityCode,makeType)
}else{
$scope.msgAlert = "起始日期不能大于结束日期,请重新选择!";
}
}
//TODO
//财务报表
var getFinanceReportData = function(start,end,citycode,type){
HttpService.getFinanceReportDatas(start,end,citycode,type,function(data){
$scope.financeData = data.respData;
for(var i=0;i<$scope.financeData.length;i++){
if(i==0){
$scope.financeData[i].isActive=true;
}else{
$scope.financeData[i].isActive=false;
}
}
console.log("初始化财务报表:",$scope.financeData)
})
}
if($rootScope.loginData.workshop == 8) {
HttpService.getTypeListData(function(data){
$scope.typeList = data.respData;
var json = ["全部类型","-1",2];
$scope.typeList.unshift(json);
})
var vm = $scope.vm = {};
HttpService.getAllCityJson(function(data){
vm.countries = data.respData;
console.log(vm.countries)
})
// 更换国家的时候清空省
$scope.$watch('vm.country', function(country) {
vm.province = null;
});
// 更换省的时候清空城市
$scope.$watch('vm.province', function(province) {
vm.city = null;
});
getFinanceReportData($scope.month_first,$scope.month_last,"-1","-1")
}
}]);
\ No newline at end of file
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